:root {
  color-scheme: light;
  --ink: #28243a;
  --ink-soft: #6e6980;
  --purple: #6849d8;
  --purple-dark: #4e35aa;
  --purple-soft: #eee8ff;
  --cream: #fffaf0;
  --paper: rgba(255, 255, 255, 0.9);
  --line: rgba(91, 73, 135, 0.12);
  --green: #4daf91;
  --yellow: #f4bd48;
  --coral: #ef7f73;
  --blue: #5b96de;
  --shadow: 0 18px 50px rgba(62, 45, 101, 0.1);
  --small-shadow: 0 8px 26px rgba(62, 45, 101, 0.08);
  --radius-lg: 30px;
  --radius-md: 22px;
  --font: "Nunito", "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(circle at 8% 20%, rgba(240, 203, 114, 0.14), transparent 28%),
    linear-gradient(150deg, #f9f7ff 0%, #fbf9f3 52%, #f3faf7 100%);
}

body.modal-open { overflow: hidden; }

button,
input,
select,
textarea { font: inherit; }

button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.ambient-one { top: -220px; right: -90px; background: rgba(142, 109, 240, 0.12); }
.ambient-two { bottom: -250px; left: -130px; background: rgba(87, 190, 153, 0.11); }

.app-shell { width: min(1460px, 100%); margin: 0 auto; }

.auth-screen {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(420px, 1.05fr);
  width: min(1080px, calc(100% - 40px));
  min-height: min(720px, calc(100vh - 64px));
  margin: 32px auto;
  overflow: hidden;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(91,73,135,.09);
  border-radius: 36px;
  box-shadow: 0 34px 90px rgba(52,38,91,.18);
}

.auth-brand-panel {
  position: relative;
  display: grid;
  align-content: center;
  padding: clamp(38px, 6vw, 72px);
  overflow: hidden;
  color: white;
  background: linear-gradient(145deg, #7354dc 0%, #4a369a 62%, #352873 100%);
}
.auth-brand-panel::before,
.auth-brand-panel::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-brand-panel::before { right: -120px; bottom: -90px; width: 360px; height: 360px; }
.auth-brand-panel::after { right: -45px; bottom: -20px; width: 210px; height: 210px; }
.auth-brand-mark { position: relative; z-index: 1; width: 58px; height: 58px; margin-bottom: 36px; font-size: 1.7rem; background: linear-gradient(145deg, #ffd977, #f2ae3a); box-shadow: 0 13px 30px rgba(24,14,70,.25); }
.auth-brand-panel .eyebrow { position: relative; z-index: 1; color: #dcd5ff; }
.auth-brand-panel h1 { position: relative; z-index: 1; max-width: 540px; margin: 14px 0 17px; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.18; letter-spacing: -.035em; }
.auth-brand-panel p { position: relative; z-index: 1; max-width: 500px; margin: 0; color: rgba(255,255,255,.75); font-size: .88rem; line-height: 1.8; }
.auth-brand-panel ul { position: relative; z-index: 1; display: grid; gap: 12px; margin: 34px 0 0; padding: 0; list-style: none; }
.auth-brand-panel li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.86); font-size: .76rem; }
.auth-brand-panel li::before { display: grid; place-items: center; width: 22px; height: 22px; content: "✓"; color: #563f9f; font-size: .65rem; font-weight: 900; background: #ffe29a; border-radius: 50%; }

.auth-card { position: relative; display: grid; align-content: center; padding: clamp(34px, 6vw, 72px); }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 30px; padding: 5px; background: #f1edf8; border-radius: 15px; }
.auth-tabs button { min-height: 42px; color: var(--ink-soft); font-weight: 900; background: transparent; border: 0; border-radius: 11px; cursor: pointer; }
.auth-tabs button.is-active { color: var(--purple-dark); background: white; box-shadow: 0 4px 14px rgba(62,45,101,.1); }
.auth-form { display: grid; gap: 16px; }
.auth-form h2 { margin: 6px 0 4px; font-size: 1.55rem; }
.auth-form > div:first-child > p { margin: 0 0 4px; color: var(--ink-soft); font-size: .76rem; line-height: 1.6; }
.auth-form label,
.auth-grid label { display: grid; gap: 7px; color: var(--ink-soft); font-size: .7rem; font-weight: 900; }
.auth-form input,
.auth-form select { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fbfafc; border: 1px solid var(--line); border-radius: 13px; outline: none; }
.auth-form input:focus,
.auth-form select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.auth-agreement { margin: -2px 0 0; color: var(--ink-soft); font-size: .63rem; line-height: 1.6; }
.auth-loading { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 14px; color: var(--ink-soft); background: rgba(255,255,255,.92); }
.auth-loading span { width: 34px; height: 34px; border: 4px solid var(--purple-soft); border-top-color: var(--purple); border-radius: 50%; animation: auth-spin .8s linear infinite; }
.auth-loading p { margin: 0; font-size: .76rem; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.account-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px clamp(20px, 4vw, 54px);
  color: #5e5674;
  background: #f0ecfb;
  border-bottom: 1px solid rgba(91,73,135,.08);
}
.account-family-button,
.account-manage-button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; color: inherit; background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.account-family-button:hover,
.account-manage-button:hover { background: rgba(255,255,255,.7); }
.account-family-button strong { color: var(--ink); font-size: .73rem; }
.account-family-button > span:last-child { color: var(--purple); font-size: .62rem; font-weight: 900; }
.account-manage-button { margin-left: auto; text-align: left; }
.account-manage-button > span:last-child { display: grid; }
.account-manage-button strong { font-size: .68rem; }
.account-manage-button small { color: var(--ink-soft); font-size: .58rem; }
.avatar-parent { width: 30px; height: 30px; color: #fff; background: linear-gradient(145deg, #7659dc, #4d379e); border-radius: 10px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; font-size: .63rem; font-weight: 800; }
.sync-status i { width: 7px; height: 7px; background: #4daf91; border-radius: 50%; box-shadow: 0 0 0 4px rgba(77,175,145,.12); }
.sync-status[data-state="pending"] i { background: #e1a62e; box-shadow: 0 0 0 4px rgba(225,166,46,.12); }
.sync-status[data-state="offline"] i { background: #df756d; box-shadow: 0 0 0 4px rgba(223,117,109,.12); }
.sync-status[data-state="merged"] i { background: #6c52ca; box-shadow: 0 0 0 4px rgba(108,82,202,.12); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  min-height: 88px;
  padding: 14px clamp(20px, 4vw, 54px);
  background: rgba(250, 248, 255, 0.84);
  border-bottom: 1px solid rgba(92, 69, 139, 0.07);
  backdrop-filter: blur(22px);
}

.brand,
.profile-chip,
.parent-entry,
.nav-button,
.quiet-button,
.primary-button,
.secondary-button,
.text-button,
.modal-close,
.task-card,
.course-card { border: 0; cursor: pointer; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  text-align: left;
  background: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  font-size: 1.45rem;
  background: linear-gradient(145deg, #8b70ef, #5b3fc4);
  border-radius: 17px 17px 17px 7px;
  box-shadow: 0 9px 20px rgba(93, 64, 196, 0.25);
}

.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 1.02rem; letter-spacing: .08em; }
.brand small { color: var(--ink-soft); font-size: .7rem; }

.main-nav { display: flex; justify-content: center; gap: 6px; }
.main-nav[hidden] { display: none !important; }

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  color: var(--ink-soft);
  font-weight: 800;
  background: transparent;
  border-radius: 14px;
  transition: 160ms ease;
}

.nav-button span { font-size: 1.15rem; }
.nav-button:hover,
.nav-button.is-active { color: var(--purple); background: var(--purple-soft); }

.top-actions { display: flex; align-items: center; gap: 10px; }

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 204px;
  padding: 7px 11px 7px 7px;
  text-align: left;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.profile-copy { display: grid; flex: 1; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--ink-soft); font-size: .67rem; }

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  font-weight: 900;
  border-radius: 14px;
}

.avatar-child { color: #624309; background: #ffe19c; }

.parent-entry,
.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  color: var(--purple-dark);
  font-weight: 800;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--small-shadow);
}

main { padding: 34px clamp(20px, 4vw, 54px) 68px; }

.view { display: none; animation: view-in 280ms ease both; }
.view.is-active { display: block; }

@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.hero-card,
.side-card,
.surface-card,
.insight-card,
.garden-card {
  background: var(--paper);
  border: 1px solid rgba(102, 76, 155, .08);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 390px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 78% 15%, rgba(255,255,255,.14), transparent 22%),
    linear-gradient(135deg, #694dd6 0%, #5438b8 58%, #42308c 100%);
  border: 0;
}

.hero-card::after {
  position: absolute;
  right: -45px;
  bottom: -85px;
  width: 290px;
  height: 190px;
  content: "";
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.hero-copy { z-index: 2; padding: 50px 0 38px 48px; }
.eyebrow { color: #8b7ca9; font-size: .68rem; font-weight: 900; letter-spacing: .16em; }
.hero-copy .eyebrow { color: #d6cdfc; }
.hero-copy h1 { max-width: 610px; margin: 12px 0 12px; font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1.16; }
.hero-copy p { max-width: 620px; margin: 0; color: rgba(255,255,255,.78); font-size: .95rem; line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 900;
  border-radius: 15px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button { color: white; background: linear-gradient(135deg, #7357df, #5639bc); box-shadow: 0 10px 22px rgba(74, 48, 164, .21); }
.hero-card .primary-button { color: #4d3697; background: #fff; box-shadow: 0 12px 26px rgba(34, 18, 84, .22); }
.secondary-button { color: var(--purple-dark); background: #f0ebff; border: 1px solid rgba(104,73,216,.1); }
.hero-card .secondary-button { color: white; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.primary-button:hover,
.secondary-button:hover { transform: translateY(-2px); }
.full-button { width: 100%; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 30px; color: rgba(255,255,255,.67); font-size: .76rem; }
.hero-meta span { display: flex; align-items: center; gap: 4px; }
.hero-meta b { color: white; }

.planet-scene { position: relative; z-index: 1; min-height: 350px; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.orbit-one { inset: 48px -70px 18px -5px; transform: rotate(-17deg); }
.orbit-two { inset: 87px -45px 57px 28px; transform: rotate(20deg); }
.planet {
  position: absolute;
  top: 92px;
  left: 45px;
  display: grid;
  place-items: center;
  width: 174px;
  height: 174px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.48), transparent 7%),
    radial-gradient(circle at 68% 66%, rgba(204,139,66,.22), transparent 13%),
    linear-gradient(145deg, #ffe6a6, #efaa62);
  border-radius: 50%;
  box-shadow: inset -18px -18px 36px rgba(126, 64, 40, .16), 0 24px 50px rgba(33, 15, 84, .26);
}
.planet::after {
  position: absolute;
  width: 260px;
  height: 55px;
  content: "";
  border: 12px solid rgba(255, 220, 144, .58);
  border-right-color: rgba(255,255,255,.72);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.planet-face { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 12px); gap: 42px; margin-top: 8px; }
.planet-face i { width: 11px; height: 15px; background: #60417e; border-radius: 50%; }
.planet-face b { position: absolute; top: 34px; left: 33px; width: 30px; height: 13px; border-bottom: 4px solid #60417e; border-radius: 50%; }
.mini-star { position: absolute; color: #ffe18b; text-shadow: 0 2px 12px rgba(255,220,120,.4); }
.star-one { top: 63px; left: 15px; font-size: 1.2rem; }
.star-two { top: 54px; right: 26px; font-size: .75rem; }
.star-three { right: 52px; bottom: 74px; font-size: 1.4rem; }
.progress-bubble {
  position: absolute;
  right: 22px;
  bottom: 30px;
  z-index: 2;
  display: grid;
  min-width: 112px;
  padding: 14px 16px;
  text-align: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}
.progress-bubble strong { font-size: 1.25rem; }
.progress-bubble span { color: rgba(255,255,255,.7); font-size: .7rem; }

.side-card { padding: 30px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.compact-heading { margin-bottom: 14px; }
.card-heading h2,
.section-heading h2,
.insight-card h2,
.garden-card h2 { margin: 7px 0 0; font-size: 1.22rem; }
.goal-badge { padding: 7px 11px; color: var(--green); font-size: .72rem; font-weight: 900; background: #e8f7f1; border-radius: 11px; }
.goal-ring-wrap { display: grid; justify-items: center; text-align: center; }
.goal-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  margin: 12px 0 18px;
  background: conic-gradient(var(--green) var(--progress), #e9e6ef var(--progress));
  border-radius: 50%;
  transition: background 450ms ease;
}
.goal-ring::before { position: absolute; width: 120px; height: 120px; content: ""; background: white; border-radius: 50%; }
.goal-ring > div { position: relative; z-index: 1; display: grid; }
.goal-ring strong { font-size: 1.8rem; }
.goal-ring span { color: var(--ink-soft); font-size: .72rem; }
.goal-ring-wrap p { margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.7; }

.baseline-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #fffaf0, #f3efff);
  border: 1px solid rgba(104, 73, 216, .12);
  border-radius: 24px;
  box-shadow: var(--small-shadow);
}
.baseline-banner[hidden] { display: none; }
.baseline-banner-mark { display: grid; place-items: center; width: 56px; height: 56px; color: #6b4bcf; font-size: 1.45rem; font-weight: 900; background: white; border-radius: 19px; box-shadow: var(--small-shadow); }
.baseline-banner h2 { margin: 6px 0 4px; font-size: 1.05rem; }
.baseline-banner p { margin: 0; color: var(--ink-soft); font-size: .74rem; line-height: 1.6; }

.content-section { margin-top: 38px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading p,
.page-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: .85rem; }
.text-button { padding: 9px 0; color: var(--purple); font-size: .8rem; font-weight: 900; background: transparent; }

.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.task-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  min-height: 148px;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--small-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.task-card.is-complete { opacity: .7; }
.task-icon,
.course-icon,
.lesson-subject-icon {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  color: var(--subject-color, var(--purple));
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--subject-soft, var(--purple-soft));
  border-radius: 17px;
}
.task-copy { display: grid; gap: 5px; }
.task-copy strong { font-size: .93rem; }
.task-copy span { color: var(--ink-soft); font-size: .72rem; }
.task-copy small { color: #777083; font-size: .62rem; line-height: 1.5; }
.task-level { align-self: start; padding: 6px 9px; color: var(--subject-color, var(--purple)); font-size: .64rem; font-weight: 900; background: var(--subject-soft, var(--purple-soft)); border-radius: 9px; }
.task-check { color: var(--green); font-size: 1.25rem; font-weight: 900; }

.twin-section { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.insight-card,
.garden-card { display: flex; align-items: center; gap: 22px; min-height: 160px; padding: 25px 28px; }
.insight-icon { display: grid; flex: 0 0 auto; place-items: center; width: 66px; height: 66px; color: #b06a10; font-size: 2rem; background: #fff1c9; border-radius: 22px; }
.insight-card p,
.garden-card p { margin: 7px 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.65; }
.garden-card { justify-content: space-between; overflow: hidden; background: linear-gradient(135deg, #f0fbf4, white); }
.plant { position: relative; width: 100px; height: 106px; transform-origin: bottom center; animation: plant-sway 4s ease-in-out infinite; }
@keyframes plant-sway { 50% { transform: rotate(1.5deg); } }
.stem { position: absolute; bottom: 25px; left: 50px; width: 6px; height: 58px; background: #66a873; border-radius: 5px; }
.pot { position: absolute; bottom: 5px; left: 27px; width: 52px; height: 32px; background: #d78d61; border-radius: 5px 5px 19px 19px; }
.leaf { position: absolute; z-index: 1; width: 32px; height: 20px; background: #68bd7e; border-radius: 80% 10% 80% 10%; transform-origin: right bottom; }
.leaf-a { left: 19px; top: 26px; transform: rotate(25deg); }
.leaf-b { right: 17px; top: 42px; transform: scaleX(-1) rotate(19deg); }
.leaf-c { left: 22px; top: 57px; transform: rotate(8deg); }
.leaf-d { right: 16px; top: 16px; transform: scaleX(-1) rotate(35deg); }
.plant[data-level="1"] .leaf-c,
.plant[data-level="1"] .leaf-d,
.plant[data-level="2"] .leaf-d { opacity: .14; }

.page-heading,
.parent-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 14px 0 32px; }
.page-heading h1,
.parent-header h1 { margin: 9px 0 0; font-size: clamp(2rem, 4vw, 3.15rem); }
.level-legend { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .72rem; }
.level-legend span { width: 9px; height: 9px; background: var(--green); border-radius: 50%; }
.level-legend span:nth-child(2) { margin-left: 10px; background: var(--yellow); }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-card {
  position: relative;
  min-height: 285px;
  padding: 25px;
  overflow: hidden;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--small-shadow);
  transition: 180ms ease;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-card::after { position: absolute; right: -36px; bottom: -48px; width: 150px; height: 150px; content: ""; background: var(--subject-soft); border-radius: 50%; }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.course-icon { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 21px; }
.course-status { padding: 7px 10px; color: var(--subject-color); font-size: .66rem; font-weight: 900; background: var(--subject-soft); border-radius: 10px; }
.course-card h2 { margin: 23px 0 7px; font-size: 1.25rem; }
.course-card p { min-height: 43px; margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.65; }
.course-progress { margin-top: 22px; }
.course-progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--ink-soft); font-size: .69rem; }
.progress-track { height: 8px; overflow: hidden; background: #eeeaf2; border-radius: 99px; }
.progress-track i { display: block; width: 0; height: 100%; background: var(--subject-color); border-radius: inherit; transition: width 500ms ease; }
.course-card-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 20px; color: var(--subject-color); font-size: .76rem; font-weight: 900; }
.course-card-foot > span:last-child { white-space: nowrap; }

.growth-summary,
.parent-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { display: flex; align-items: center; gap: 14px; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--small-shadow); }
.metric-icon { display: grid; place-items: center; width: 46px; height: 46px; color: var(--purple); font-size: 1.15rem; background: var(--purple-soft); border-radius: 15px; }
.metric-copy { display: grid; gap: 2px; }
.metric-copy strong { font-size: 1.45rem; }
.metric-copy span { color: var(--ink-soft); font-size: .72rem; }
.growth-layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: 20px; }
.surface-card { padding: 26px; }
.mastery-list,
.history-list,
.ability-list { display: grid; gap: 15px; }
.mastery-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 12px; }
.mastery-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 900; }
.mastery-label i { width: 10px; height: 10px; background: var(--row-color); border-radius: 50%; }
.mastery-label > span { display: grid; gap: 2px; }
.mastery-label small { color: var(--ink-soft); font-size: .58rem; font-weight: 700; }
.mastery-row > strong { color: var(--row-color); font-size: .76rem; text-align: right; }
.history-item { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 14px; background: #faf9fc; border-radius: 16px; }
.history-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--row-color); background: var(--row-soft); border-radius: 14px; }
.history-copy { display: grid; gap: 3px; }
.history-copy strong { font-size: .79rem; }
.history-copy span,
.history-score { color: var(--ink-soft); font-size: .69rem; }
.empty-state { padding: 32px 18px; color: var(--ink-soft); text-align: center; background: #faf9fc; border-radius: 17px; }

.parent-view { --purple: #5c47b9; }
.parent-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.data-caption { color: var(--ink-soft); font-size: .68rem; }
.parent-plan-card { margin-bottom: 20px; }
.parent-plan-card .data-caption { max-width: 500px; line-height: 1.55; text-align: right; }
.parent-plan-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.parent-plan-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-width: 0; padding: 15px; background: linear-gradient(145deg, var(--subject-soft), white); border: 1px solid rgba(91,73,135,.08); border-radius: 16px; }
.parent-plan-order { display: grid; place-items: center; width: 31px; height: 31px; color: var(--subject-color); font-size: .69rem; font-weight: 900; background: white; border-radius: 10px; }
.parent-plan-copy { display: grid; min-width: 0; gap: 2px; }
.parent-plan-copy strong { font-size: .76rem; }
.parent-plan-copy span { color: var(--subject-color); font-size: .64rem; font-weight: 900; }
.parent-plan-copy small { overflow: hidden; color: var(--ink-soft); font-size: .58rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.parent-plan-meta { display: grid; flex: 0 0 auto; gap: 2px; text-align: right; }
.parent-plan-meta b { color: var(--subject-color); font-size: .63rem; }
.parent-plan-meta small { color: var(--ink-soft); font-size: .55rem; }
.parent-skill-path-card { margin-bottom: 20px; }
.parent-skill-path-card .data-caption { max-width: 510px; line-height: 1.55; text-align: right; }
.parent-skill-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.skill-path-subject { min-width: 0; padding: 17px; background: linear-gradient(145deg, var(--subject-soft), white 68%); border: 1px solid rgba(91,73,135,.08); border-radius: 18px; }
.skill-path-subject header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.skill-path-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--subject-color); font-weight: 900; background: white; border-radius: 12px; }
.skill-path-subject header > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.skill-path-subject header strong { font-size: .76rem; }
.skill-path-subject header small { overflow: hidden; color: var(--ink-soft); font-size: .56rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.skill-path-subject header b { color: var(--subject-color); font-size: .62rem; white-space: nowrap; }
.skill-path-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.skill-path-step { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 8px; background: rgba(255,255,255,.78); border: 1px solid rgba(91,73,135,.07); border-radius: 11px; }
.skill-path-step > i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 3px; background: #a39caf; border-radius: 50%; }
.skill-path-step > span { display: grid; min-width: 0; gap: 2px; font-size: .58rem; font-weight: 900; }
.skill-path-step small { color: var(--ink-soft); font-size: .5rem; font-weight: 700; line-height: 1.35; }
.skill-path-step.is-review_due > i { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.skill-path-step.is-consolidate > i { background: var(--coral); }
.skill-path-step.is-observing > i,
.skill-path-step.is-not_started > i { background: var(--yellow); }
.skill-path-step.is-challenge > i { background: var(--blue); }
.skill-path-step.is-stable > i { background: var(--green); }
.skill-path-subject.has-weekly-focus { border-color: color-mix(in srgb, var(--subject-color) 28%, white); box-shadow: 0 8px 22px rgba(45,33,82,.06); }
.skill-path-step.is-parent-focused { border-color: color-mix(in srgb, var(--subject-color) 30%, white); background: white; }
.skill-path-step em { width: max-content; padding: 2px 5px; color: var(--subject-color); font-size: .46rem; font-style: normal; font-weight: 900; background: var(--subject-soft); border-radius: 5px; }
.skill-path-subject > p { margin: 12px 0 0; color: var(--ink-soft); font-size: .59rem; line-height: 1.55; }
.skill-path-subject > p strong { color: var(--subject-color); }
.curriculum-profile-card { display: grid; grid-template-columns: auto minmax(0, 1.35fr) minmax(220px, .65fr); align-items: center; gap: 17px; margin-bottom: 20px; background: linear-gradient(135deg, #eef8f4, white 58%, #f5f1ff); }
.curriculum-profile-icon { display: grid; place-items: center; width: 48px; height: 48px; color: #24735c; font-size: 1rem; font-weight: 1000; background: #dff2e9; border-radius: 15px; }
.curriculum-profile-copy { min-width: 0; }
.curriculum-profile-copy h2 { margin: 6px 0 5px; font-size: 1rem; }
.curriculum-profile-copy p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.curriculum-profile-copy > small { display: block; margin-top: 7px; color: #857c96; font-size: .57rem; line-height: 1.5; }
.curriculum-editions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.curriculum-editions span { display: flex; gap: 5px; padding: 6px 8px; color: #655d70; font-size: .56rem; background: rgba(255,255,255,.8); border: 1px solid rgba(64,130,105,.12); border-radius: 8px; }
.curriculum-editions b { color: #24735c; }
.curriculum-track-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.curriculum-track { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px; color: #655d70; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 11px; }
.curriculum-track b { font-size: .65rem; }
.curriculum-track small { color: #867d94; font-size: .51rem; }
.curriculum-track.is-formal { border-color: rgba(50,139,105,.2); }
.curriculum-track.is-formal small { color: #24735c; font-weight: 900; }
.content-library-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; margin-bottom: 20px; background: linear-gradient(135deg, #f7f3ff, white); }
.content-library-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--purple); font-size: 1.2rem; font-weight: 900; background: #ebe4ff; border-radius: 15px; }
.content-library-copy { min-width: 0; }
.content-library-copy h2 { margin: 6px 0 5px; font-size: 1rem; }
.content-library-copy p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.content-library-copy > small { display: block; margin-top: 3px; color: #857c96; font-size: .58rem; line-height: 1.5; }
.content-library-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.content-library-actions .secondary-button,
.content-library-actions .button-link { min-height: 40px; }
.button-link { text-decoration: none; }
.installed-pack-list { display: grid; grid-column: 1 / -1; gap: 8px; width: 100%; }
.installed-pack-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 13px; background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 14px; }
.installed-pack-mark { display: grid; place-items: center; width: 31px; height: 31px; color: var(--purple); font-weight: 900; background: var(--purple-soft); border-radius: 10px; }
.installed-pack-copy { display: grid; min-width: 0; gap: 3px; }
.installed-pack-copy strong { font-size: .72rem; }
.installed-pack-copy strong small { color: var(--purple); font-size: .55rem; }
.installed-pack-copy > span,
.installed-pack-copy > small { color: var(--ink-soft); font-size: .59rem; line-height: 1.45; }
.installed-pack-item .quiet-button { min-height: 34px; padding: 0 11px; font-size: .62rem; box-shadow: none; }
.content-library-warning { margin: 0; padding: 10px 12px; color: #805f18; font-size: .62rem; line-height: 1.5; background: #fff3d7; border-radius: 11px; }
.compact-empty { padding: 13px; }
.data-safety-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; margin-bottom: 20px; background: linear-gradient(135deg, #f5fbf8, white); }
.data-safety-icon { display: grid; place-items: center; width: 48px; height: 48px; color: #2e8065; font-size: 1.2rem; font-weight: 900; background: #e1f4ec; border-radius: 15px; }
.data-safety-copy { min-width: 0; }
.data-safety-copy h2 { margin: 6px 0 5px; font-size: 1rem; }
.data-safety-copy p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.data-safety-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.data-safety-actions button { min-height: 40px; }
.device-install-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; margin-bottom: 20px; background: linear-gradient(135deg, #eef8ff, white); }
.device-install-icon { display: grid; place-items: center; width: 48px; height: 48px; color: #3479af; font-size: 1.25rem; font-weight: 900; background: #dff0fd; border-radius: 15px; }
.device-install-copy { min-width: 0; }
.device-install-copy h2 { margin: 6px 0 5px; font-size: 1rem; }
.device-install-copy p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.device-install-actions { display: flex; justify-content: flex-end; }
.device-install-actions button { min-height: 40px; }
.parent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.span-two { grid-column: span 2; }
.span-three { grid-column: 1 / -1; }
.trend-chart { min-height: 255px; }
.trend-svg { width: 100%; height: 255px; overflow: visible; }
.trend-grid-line { stroke: #ece9f1; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--purple); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: url(#trendFill); }
.trend-dot { fill: white; stroke: var(--purple); stroke-width: 3; }
.trend-text { fill: var(--ink-soft); font-family: var(--font); font-size: 11px; }
.ability-row { display: grid; gap: 8px; }
.ability-row-head { display: flex; justify-content: space-between; gap: 10px; font-size: .76rem; }
.ability-row-head span:last-child { color: var(--ink-soft); }
.ability-note { margin-top: 18px; padding: 13px; color: var(--ink-soft); font-size: .68rem; line-height: 1.6; background: #faf9fc; border-radius: 13px; }
.process-evidence-summary { display: grid; grid-template-columns: minmax(150px, .35fr) 1fr; align-items: center; gap: 20px; margin-bottom: 18px; padding: 17px 19px; background: #f4f0ff; border-radius: 16px; }
.process-evidence-summary > div { display: grid; gap: 3px; }
.process-evidence-summary strong { color: var(--purple); font-size: 1.35rem; }
.process-evidence-summary span { color: var(--ink-soft); font-size: .65rem; }
.process-evidence-summary p { margin: 0; color: #5e5870; font-size: .74rem; line-height: 1.65; }
.process-evidence-bars { display: grid; gap: 10px; }
.process-evidence-row { display: grid; grid-template-columns: minmax(100px, 145px) 1fr 42px; align-items: center; gap: 12px; font-size: .72rem; }
.process-evidence-row > span { font-weight: 900; }
.process-evidence-row > i { height: 9px; overflow: hidden; background: #ede9f5; border-radius: 999px; }
.process-evidence-row > i b { display: block; height: 100%; background: linear-gradient(90deg, #7656db, #a391e4); border-radius: inherit; }
.process-evidence-row > strong { color: var(--purple); font-size: .68rem; text-align: right; }
.process-evidence-row.muted { color: var(--ink-soft); }
.process-evidence-row.muted > i b { background: #bbb4ca; }
.process-evidence-row.muted > strong { color: var(--ink-soft); }
.process-evidence-note { margin: 17px 0 0; color: var(--ink-soft); font-size: .65rem; line-height: 1.6; }
.content-cycle-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.content-cycle-metrics article { display: grid; gap: 4px; padding: 16px; background: #faf9fc; border: 1px solid var(--line); border-radius: 15px; }
.content-cycle-metrics strong { color: var(--purple); font-size: 1.25rem; }
.content-cycle-metrics span { font-size: .72rem; font-weight: 900; }
.content-cycle-metrics small { color: var(--ink-soft); font-size: .58rem; line-height: 1.5; }
.content-cycle-note { margin: 12px 0 0; color: var(--ink-soft); font-size: .64rem; line-height: 1.6; }
.parent-subject-table { display: grid; gap: 4px; }
.subject-table-head,
.subject-table-row { display: grid; grid-template-columns: 1.2fr .9fr .8fr 1.6fr; align-items: center; gap: 12px; padding: 12px 14px; }
.subject-table-head { color: var(--ink-soft); font-size: .66rem; font-weight: 900; border-bottom: 1px solid var(--line); }
.subject-table-row { font-size: .76rem; border-bottom: 1px solid rgba(91,73,135,.06); }
.subject-table-row:last-child { border-bottom: 0; }
.subject-name-cell { display: flex; align-items: center; gap: 9px; font-weight: 900; }
.subject-name-cell i { width: 10px; height: 10px; background: var(--row-color); border-radius: 50%; }
.status-pill { width: fit-content; padding: 5px 8px; font-size: .62rem; font-weight: 900; border-radius: 8px; }
.status-pill.good { color: #34856b; background: #e5f6ef; }
.status-pill.steady { color: #8b6818; background: #fff3d7; }
.status-pill.watch { color: #a65651; background: #ffebe8; }
.recommendation-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.recommendation-list li { padding: 14px 16px; color: #5e5870; font-size: .76rem; line-height: 1.65; background: linear-gradient(135deg, #f4f0ff, #faf8ff); border-left: 4px solid var(--purple); border-radius: 5px 14px 14px 5px; }

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(34, 27, 54, .54);
  backdrop-filter: blur(9px);
  transition: opacity 180ms ease;
}
.modal-layer.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.family-compact-modal { width: min(560px, 100%); }
.family-modal { width: min(960px, 100%); }
.family-modal-intro { margin: -7px 0 18px; color: var(--ink-soft); font-size: .72rem; line-height: 1.65; }
.child-switch-list { display: grid; gap: 10px; margin-bottom: 18px; }
.child-choice,
.family-child-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  text-align: left;
  background: #faf9fc;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
}
.child-choice:hover,
.family-child-card:hover { border-color: #b8a9eb; }
.child-choice.is-active,
.family-child-card.is-active { background: var(--purple-soft); border-color: #a794e7; }
.child-choice > span:nth-child(2),
.family-child-card > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.child-choice strong,
.family-child-card strong { font-size: .78rem; }
.child-choice small,
.family-child-card small { overflow: hidden; color: var(--ink-soft); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.child-choice em,
.family-child-card em { color: var(--purple); font-size: .62rem; font-style: normal; font-weight: 900; }
.family-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; background: linear-gradient(135deg, #f3efff, #faf8ff); border-radius: 16px; }
.family-overview label,
.family-overview > div { display: grid; gap: 6px; color: var(--ink-soft); font-size: .64rem; font-weight: 900; }
.family-overview select { min-height: 42px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 11px; }
.family-overview strong { color: var(--ink); font-size: .75rem; }
.family-section { margin-top: 16px; padding: 18px; background: #fbfafc; border: 1px solid var(--line); border-radius: 18px; }
.family-section h3 { margin: 5px 0 0; font-size: .93rem; }
.family-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.family-child-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.family-inline-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.family-inline-form label { display: grid; gap: 5px; color: var(--ink-soft); font-size: .62rem; font-weight: 900; }
.family-inline-form input,
.family-inline-form select,
.family-stack-form input,
.family-stack-form select { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 11px; outline: none; }
.family-inline-form .form-error { grid-column: 1 / -1; margin: 0; }
.family-member-list { display: grid; gap: 8px; }
.family-member-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 10px 12px; background: white; border-radius: 13px; }
.family-member-item > span:nth-child(2) { display: grid; gap: 2px; }
.family-member-item strong { font-size: .72rem; }
.family-member-item small { color: var(--ink-soft); font-size: .61rem; }
.family-member-item em { color: var(--purple); font-size: .61rem; font-style: normal; font-weight: 900; }
.invite-result { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; margin-top: 12px; padding: 13px; color: #685622; background: #fff5d9; border-radius: 13px; }
.invite-result span { font-size: .63rem; }
.invite-result strong { font-size: 1rem; letter-spacing: .1em; }
.family-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.family-stack-form { display: grid; gap: 9px; margin-top: 12px; }
.family-stack-form .form-error { margin: 0; }
.family-mini-grid { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.family-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 18px; color: var(--ink-soft); font-size: .64rem; }
.danger-button { color: #b6534d; background: #ffefed; }
.migration-modal { text-align: center; }
.migration-actions { display: flex; gap: 10px; margin-top: 20px; }
.migration-actions button { flex: 1; }
.onboarding-modal {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(430px, 1.25fr);
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: white;
  border-radius: 32px;
  box-shadow: 0 35px 90px rgba(29, 20, 61, .32);
}
.onboarding-intro { position: relative; min-height: 650px; padding: 42px 38px; overflow: hidden; color: white; background: linear-gradient(150deg, #684bd4, #44318e); }
.onboarding-intro::after { position: absolute; right: -90px; bottom: -105px; width: 280px; height: 280px; content: ""; background: rgba(255,255,255,.07); border-radius: 50%; }
.onboarding-intro .eyebrow { color: #d7cff8; }
.onboarding-intro h2 { position: relative; z-index: 1; margin: 28px 0 12px; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.3; }
.onboarding-intro p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.76); font-size: .8rem; line-height: 1.75; }
.onboarding-intro ul { position: relative; z-index: 1; display: grid; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.onboarding-intro li { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.84); font-size: .74rem; }
.onboarding-intro li::before { display: grid; place-items: center; width: 20px; height: 20px; content: "✓"; color: #4b3697; font-size: .65rem; font-weight: 900; background: #ffe5a1; border-radius: 50%; }
.onboarding-orbit { position: relative; width: 230px; height: 210px; margin: 26px auto 4px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; transform: rotate(-8deg); }
.onboarding-orbit::before { position: absolute; inset: 30px 18px; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; transform: rotate(26deg); }
.onboarding-orbit b { position: absolute; top: 66px; left: 79px; display: grid; place-items: center; width: 72px; height: 72px; color: #563d9e; font-size: 1.35rem; background: #ffe3a0; border-radius: 25px; box-shadow: 0 18px 35px rgba(25,13,76,.3); transform: rotate(8deg); }
.onboarding-orbit span { position: absolute; display: grid; place-items: center; width: 32px; height: 32px; font-size: .75rem; font-weight: 900; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22); border-radius: 11px; transform: rotate(8deg); }
.onboarding-orbit span:nth-child(1) { top: -9px; left: 95px; }
.onboarding-orbit span:nth-child(2) { top: 30px; right: -3px; }
.onboarding-orbit span:nth-child(3) { right: 7px; bottom: 22px; }
.onboarding-orbit span:nth-child(4) { bottom: -7px; left: 94px; }
.onboarding-orbit span:nth-child(5) { bottom: 29px; left: -5px; }
.onboarding-orbit span:nth-child(6) { top: 28px; left: 2px; }
.onboarding-form { display: grid; align-content: start; gap: 15px; padding: 34px 38px; }
.onboarding-form-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.onboarding-form-heading strong { font-size: 1.05rem; }
.step-pill { padding: 6px 9px; color: var(--purple-dark); font-size: .62rem; font-weight: 900; background: var(--purple-soft); border-radius: 9px; }
.onboarding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.onboarding-grid label,
.onboarding-wide { display: grid; gap: 6px; color: var(--ink-soft); font-size: .69rem; font-weight: 900; }
.onboarding-grid input,
.onboarding-grid select,
.onboarding-wide input,
.onboarding-wide textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #faf9fc; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.onboarding-grid input:focus,
.onboarding-grid select:focus,
.onboarding-wide input:focus,
.onboarding-wide textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.grade-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.grade-choice legend { margin-bottom: 7px; color: var(--ink-soft); font-size: .69rem; font-weight: 900; }
.grade-choice label { position: relative; cursor: pointer; }
.grade-choice input { position: absolute; opacity: 0; }
.grade-choice label > span { display: grid; gap: 2px; padding: 13px 14px; background: #faf9fc; border: 2px solid transparent; border-radius: 13px; transition: 150ms ease; }
.grade-choice b { font-size: .78rem; }
.grade-choice small { color: var(--ink-soft); font-size: .61rem; }
.grade-choice input:checked + span { color: var(--purple-dark); background: var(--purple-soft); border-color: #a694e7; }
.grade-choice input:focus-visible + span { outline: 3px solid rgba(104,73,216,.2); }
.onboarding-note { padding: 11px 13px; color: #75634b; font-size: .66rem; line-height: 1.55; background: #fff7e3; border-radius: 11px; }
.onboarding-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.lesson-modal {
  width: min(900px, 100%);
  min-height: min(690px, calc(100vh - 40px));
  overflow: hidden;
  background: #fbfafc;
  border-radius: 32px;
  box-shadow: 0 35px 90px rgba(29, 20, 61, .3);
}
.lesson-header { display: grid; grid-template-columns: 1fr minmax(160px, 260px) auto; align-items: center; gap: 20px; padding: 19px 24px; background: white; border-bottom: 1px solid var(--line); }
.lesson-header > div:first-child { display: flex; align-items: center; gap: 12px; }
.lesson-subject-icon { width: 44px; height: 44px; border-radius: 14px; }
.lesson-header small,
.lesson-header strong { display: block; }
.lesson-header small { color: var(--ink-soft); font-size: .66rem; }
.lesson-header strong { margin-top: 2px; font-size: .88rem; }
.lesson-progress-wrap { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .68rem; }
.lesson-progress { flex: 1; height: 7px; overflow: hidden; background: #eeeaf2; border-radius: 99px; }
.lesson-progress i { display: block; width: 20%; height: 100%; background: var(--purple); border-radius: inherit; transition: width 260ms ease; }
.modal-close { display: grid; place-items: center; width: 39px; height: 39px; color: var(--ink-soft); font-size: 1.4rem; background: #f4f1f8; border-radius: 13px; }
.lesson-body { display: grid; align-content: center; min-height: 600px; padding: 44px clamp(24px, 7vw, 84px); }
.question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 9px; }
.question-tag { padding: 6px 10px; color: var(--subject-color); font-size: .65rem; font-weight: 900; background: var(--subject-soft); border-radius: 9px; }
.question-grade { color: var(--ink-soft); font-size: .67rem; }
.question-curriculum,
.question-demand { padding: 4px 8px; color: #6b627a; font-size: .56rem; font-weight: 900; background: #f3f0f7; border-radius: 7px; }
.question-curriculum.is-formal { color: #276a57; background: #e2f4ec; }
.question-demand { color: #725b2c; background: #fff2ce; }
.question-unit { margin: 0 0 15px; color: var(--ink-soft); font-size: .62rem; line-height: 1.45; }
.question-practice { margin-left: auto; padding: 5px 9px; color: #5c5670; font-size: .6rem; font-weight: 900; background: #f1eff6; border-radius: 8px; }
.question-practice.is-variant { color: #8b5b10; background: #fff0c8; }
.question-practice.is-retry { color: #9a4f49; background: #ffe8e4; }
.question-practice.is-review { color: #4b4b9b; background: #e9e8ff; }
.question-practice.is-new { color: #2e765d; background: #e2f5ec; }
.question-prompt { margin: 0 0 28px; font-size: clamp(1.32rem, 3vw, 2rem); line-height: 1.55; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.option-button { min-height: 64px; padding: 15px 18px; color: var(--ink); font-weight: 800; text-align: left; background: white; border: 2px solid #ece8f2; border-radius: 17px; cursor: pointer; transition: 150ms ease; }
.option-button:hover { border-color: #b9a9ec; transform: translateY(-1px); }
.option-button.is-correct { color: #28715a; background: #eaf8f2; border-color: #65ba9b; }
.option-button.is-wrong { color: #9e4c46; background: #fff0ed; border-color: #ef9d95; }
.option-button:disabled { cursor: default; transform: none; }
.lesson-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.hint-button { padding: 10px 0; color: var(--purple); font-weight: 900; background: transparent; border: 0; cursor: pointer; }
.feedback-box { display: none; gap: 8px; margin-top: 20px; padding: 17px 18px; font-size: .8rem; line-height: 1.65; background: #f3f0fa; border-radius: 16px; }
.feedback-box.is-visible { display: grid; }
.feedback-box.correct { color: #316e5b; background: #eaf8f2; }
.feedback-box.wrong { color: #8d504c; background: #fff0ed; }
.error-reason-prompt { display: grid; gap: 10px; margin-top: 5px; padding: 14px; color: #5e5870; background: rgba(255,255,255,.72); border: 1px solid rgba(188,92,83,.15); border-radius: 14px; }
.error-reason-prompt > strong { color: #6f4845; font-size: .74rem; }
.error-reason-options { display: flex; flex-wrap: wrap; gap: 8px; }
.error-reason-chip { min-height: 38px; padding: 8px 11px; color: #725c5a; font: inherit; font-size: .68rem; font-weight: 900; background: white; border: 1px solid #ead0cd; border-radius: 11px; cursor: pointer; transition: 150ms ease; }
.error-reason-chip:hover { border-color: #c77770; transform: translateY(-1px); }
.error-reason-chip.is-selected { color: white; background: #b85e58; border-color: #b85e58; box-shadow: 0 5px 14px rgba(184,94,88,.2); }
.error-reason-chip:focus-visible { outline: 3px solid rgba(184,94,88,.25); outline-offset: 2px; }
.error-reason-prompt small { color: #867574; font-size: .62rem; line-height: 1.55; }
.hint-box { margin-top: 16px; padding: 15px 17px; color: #725514; font-size: .8rem; line-height: 1.6; background: #fff4d7; border-radius: 15px; }
.lesson-next { display: none; margin-left: auto; }
.lesson-next.is-visible { display: inline-flex; }
.lesson-summary { text-align: center; }
.summary-burst { display: grid; place-items: center; width: 98px; height: 98px; margin: 0 auto 20px; color: #79560e; font-size: 2.6rem; background: #ffe29a; border-radius: 35% 65% 56% 44% / 56% 43% 57% 44%; }
.lesson-summary h2 { margin: 0; font-size: 2rem; }
.lesson-summary > p { max-width: 560px; margin: 10px auto 24px; color: var(--ink-soft); line-height: 1.7; }
.summary-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; margin: 0 auto 24px; }
.summary-metric { display: grid; gap: 3px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 17px; }
.summary-metric strong { font-size: 1.25rem; }
.summary-metric span { color: var(--ink-soft); font-size: .68rem; }
.lesson-iteration-note { max-width: 620px !important; margin: 0 auto 20px !important; padding: 12px 14px; color: #5f5870 !important; font-size: .68rem; background: #f3f0fa; border-radius: 13px; }
.baseline-summary { max-width: 720px; margin: 0 auto; }
.baseline-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 auto 18px; }
.baseline-result-grid > span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; padding: 12px; text-align: left; background: var(--result-soft); border-radius: 14px; }
.baseline-result-grid i { display: grid; grid-row: span 2; place-items: center; width: 34px; height: 34px; color: var(--result-color); font-style: normal; font-weight: 900; background: white; border-radius: 11px; }
.baseline-result-grid b { font-size: .71rem; }
.baseline-result-grid small { color: var(--ink-soft); font-size: .59rem; }
.baseline-result-note { max-width: 640px; margin: 0 auto 20px; padding: 12px 14px; color: #725514; font-size: .68rem; line-height: 1.6; background: #fff4d7; border-radius: 13px; }
.reflection-field { display: grid; gap: 7px; max-width: 620px; margin: 0 auto 22px; text-align: left; }
.reflection-field span { font-size: .74rem; font-weight: 900; }
.reflection-field textarea { resize: vertical; min-height: 80px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; outline: none; }
.reflection-field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }

.small-modal,
.settings-modal { position: relative; width: min(430px, 100%); padding: 36px; background: white; border-radius: 28px; box-shadow: 0 30px 80px rgba(29,20,61,.28); }
.settings-modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.floating-close { position: absolute; top: 15px; right: 15px; }
.modal-illustration { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 19px; color: var(--purple); font-size: 1.6rem; background: var(--purple-soft); border-radius: 20px; }
.small-modal h2 { margin: 0 0 8px; }
.small-modal p { color: var(--ink-soft); font-size: .8rem; line-height: 1.6; }
.pin-field,
.form-grid label,
.wide-label { display: grid; gap: 7px; margin: 18px 0; color: var(--ink-soft); font-size: .72rem; font-weight: 900; }
.pin-field input,
.form-grid input,
.form-grid select,
.wide-label input,
.wide-label textarea { width: 100%; padding: 13px 14px; color: var(--ink); background: #faf9fc; border: 1px solid var(--line); border-radius: 13px; outline: none; }
.pin-field input { font-size: 1.2rem; letter-spacing: .35em; text-align: center; }
.pin-field input:focus,
.form-grid input:focus,
.form-grid select:focus,
.wide-label input:focus,
.wide-label textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.form-error { min-height: 20px; color: #bd514a !important; }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.settings-header h2 { margin: 6px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.weekly-focus-fieldset { min-width: 0; margin: 19px 0; padding: 0; border: 0; }
.weekly-focus-fieldset legend { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; width: 100%; color: var(--ink); }
.weekly-focus-fieldset legend span { font-size: .76rem; font-weight: 900; }
.weekly-focus-fieldset legend small { max-width: 320px; color: var(--ink-soft); font-size: .58rem; font-weight: 700; line-height: 1.5; text-align: right; }
.weekly-focus-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.weekly-focus-subject { min-width: 0; padding: 11px; background: #faf9fc; border: 1px solid var(--line); border-radius: 14px; }
.weekly-focus-subject > strong { display: flex; align-items: center; gap: 7px; font-size: .68rem; }
.weekly-focus-subject > strong i { color: var(--subject-color); font-size: .8rem; font-style: normal; }
.weekly-focus-subject > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.weekly-focus-subject label { position: relative; cursor: pointer; }
.weekly-focus-subject input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.weekly-focus-subject label span { display: block; padding: 6px 8px; color: var(--ink-soft); font-size: .59rem; font-weight: 800; background: white; border: 1px solid var(--line); border-radius: 8px; transition: 150ms ease; }
.weekly-focus-subject input:checked + span { color: var(--subject-color); background: var(--subject-soft); border-color: color-mix(in srgb, var(--subject-color) 35%, white); }
.weekly-focus-subject input:focus-visible + span { outline: 3px solid rgba(109,83,195,.2); outline-offset: 2px; }
#weekly-focus-count { margin: 8px 0 0; color: var(--ink-soft); font-size: .59rem; line-height: 1.5; }
.weekly-focus-mini { display: inline-flex; margin-right: 6px; padding: 3px 6px; color: var(--subject-color); font-size: .52rem; background: var(--subject-soft); border-radius: 6px; }
.form-note { margin: 12px 0 20px; padding: 13px; color: var(--ink-soft); font-size: .69rem; line-height: 1.6; background: #f8f6fc; border-radius: 13px; }
.restore-modal { width: min(620px, 100%); }
.restore-explanation { padding: 15px 17px; background: #f4f0ff; border-radius: 15px; }
.restore-explanation strong { font-size: .78rem; }
.restore-explanation p { margin: 5px 0 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.6; }
.restore-file-picker { position: relative; display: grid; gap: 5px; margin: 18px 0 12px; padding: 17px; color: var(--purple); text-align: center; background: #faf9fc; border: 1px dashed #bdb2df; border-radius: 15px; cursor: pointer; }
.restore-file-picker > span { font-size: .78rem; font-weight: 900; }
.restore-file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.restore-file-picker small { color: var(--ink-soft); font-size: .62rem; }
.restore-preview { display: grid; gap: 12px; padding: 17px; background: #f5fbf8; border: 1px solid #d9eee5; border-radius: 16px; }
.restore-preview[hidden] { display: none; }
.restore-preview-heading { display: flex; align-items: center; gap: 9px; }
.restore-preview-heading strong { font-size: .82rem; }
.restore-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.restore-preview-grid > span { display: grid; gap: 2px; padding: 11px; text-align: center; background: white; border-radius: 12px; }
.restore-preview-grid b { color: var(--purple); font-size: 1rem; }
.restore-preview-grid small { color: var(--ink-soft); font-size: .58rem; }
.restore-preview p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.restore-preview .restore-warning { padding: 10px 11px; color: #805f18; background: #fff3d7; border-radius: 11px; }
.restore-error { margin: 8px 0; }
.restore-actions { display: flex; justify-content: flex-end; gap: 9px; }
.restore-actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.restore-footnote { margin: 15px 0 0; color: var(--ink-soft); font-size: .61rem; line-height: 1.55; }
.content-pack-modal { width: min(650px, 100%); }
.content-pack-explanation { padding: 15px 17px; background: #f4f0ff; border-radius: 15px; }
.content-pack-explanation strong { font-size: .78rem; }
.content-pack-explanation p { margin: 5px 0 0; color: var(--ink-soft); font-size: .69rem; line-height: 1.6; }
.content-pack-example-link { display: inline-flex; margin-top: 13px; color: var(--purple); font-size: .68rem; font-weight: 900; text-decoration: none; }
.content-pack-example-link:hover { text-decoration: underline; }
.content-pack-preview { display: grid; gap: 11px; padding: 17px; background: #f5fbf8; border: 1px solid #d9eee5; border-radius: 16px; }
.content-pack-preview[hidden] { display: none; }
.content-pack-preview-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.content-pack-preview-heading strong { font-size: .82rem; }
.content-pack-preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.content-pack-preview-stats > span { display: grid; gap: 2px; padding: 11px; text-align: center; background: white; border-radius: 12px; }
.content-pack-preview-stats b { color: var(--purple); font-size: 1rem; }
.content-pack-preview-stats small { color: var(--ink-soft); font-size: .58rem; }
.content-pack-subjects { display: flex; flex-wrap: wrap; gap: 6px; }
.content-pack-subjects span { padding: 6px 8px; color: #4f6d61; font-size: .59rem; font-weight: 900; background: white; border-radius: 8px; }
.content-pack-preview p { margin: 0; color: var(--ink-soft); font-size: .66rem; line-height: 1.55; }
.content-pack-preview p strong { color: var(--ink); }
.content-pack-preview .content-pack-review-note { padding: 10px 11px; color: #805f18; background: #fff3d7; border-radius: 11px; }
.content-pack-fit { display: grid; gap: 7px; padding: 10px 11px; border: 1px solid #ddd7ef; background: #faf8ff; border-radius: 12px; }
.content-pack-fit p { margin: 0; line-height: 1.55; }
.content-pack-fit.is-compatible { border-color: #bfe2d5; background: #f1faf6; }
.content-pack-fit.is-generic,
.content-pack-fit.is-incomplete { border-color: #eddbac; background: #fffaf0; }
.content-pack-fit.is-review,
.content-pack-fit.is-mismatch { border-color: #f0c8c4; background: #fff4f2; }
.install-status-panel { display: grid; gap: 8px; padding: 14px; color: var(--ink); background: #f7f4ff; border-radius: 15px; }
.install-status-panel strong { font-size: .74rem; line-height: 1.55; }
.install-step-list { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; counter-reset: install-step; }
.install-step-list li { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 12px 13px; background: #faf9fd; border: 1px solid var(--line); border-radius: 13px; counter-increment: install-step; }
.install-step-list li::before { content: counter(install-step); grid-row: 1 / 3; display: grid; place-items: center; width: 25px; height: 25px; color: white; font-size: .62rem; font-weight: 900; background: var(--purple); border-radius: 50%; }
.install-step-list strong { font-size: .69rem; }
.install-step-list span { color: var(--ink-soft); font-size: .62rem; line-height: 1.5; }
.install-security-note { padding: 11px 12px; color: #805f18; font-size: .62rem; line-height: 1.55; background: #fff3d7; border-radius: 12px; }
.content-pack-error { margin: 8px 0; }

.report-modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #f7f5fb;
  border-radius: 30px;
  box-shadow: 0 35px 90px rgba(29, 20, 61, .32);
}
.report-modal-header,
.report-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; background: white; }
.report-modal-header { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.report-modal-header h2 { margin: 5px 0 0; font-size: 1.15rem; }
.report-modal-body { padding: 22px; }
.report-modal-actions { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--line); }
.report-modal-actions > span { max-width: 470px; color: var(--ink-soft); font-size: .68rem; line-height: 1.55; }
.report-modal-actions > div { display: flex; gap: 9px; }
.report-sheet { display: grid; gap: 18px; max-width: 880px; margin: 0 auto; }
.report-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  min-height: 180px;
  padding: 30px;
  color: white;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 225, 154, .38), transparent 28%),
    linear-gradient(135deg, #7155d9, #4d389e);
  border-radius: 24px;
}
.report-period { display: block; margin-bottom: 17px; color: rgba(255,255,255,.7); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.report-hero h3 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.report-hero p { max-width: 580px; margin: 10px 0 0; color: rgba(255,255,255,.76); font-size: .78rem; line-height: 1.65; }
.evidence-badge { display: grid; flex: 0 0 auto; gap: 3px; min-width: 150px; padding: 13px 15px; color: #41306f; background: #fff1c9; border-radius: 16px; }
.evidence-badge b { font-size: .78rem; }
.evidence-badge small { font-size: .61rem; opacity: .72; }
.evidence-badge.developing { color: #236850; background: #daf4e9; }
.evidence-badge.strong { color: #235981; background: #dceeff; }
.report-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.report-stat { display: grid; gap: 10px; padding: 18px 19px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--small-shadow); }
.report-stat > span { color: var(--ink-soft); font-size: .68rem; }
.report-stat strong { font-size: 1.35rem; }
.report-stat strong small { margin-left: 3px; color: var(--ink-soft); font-size: .6rem; }
.report-evidence-note { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px 17px; color: #665d78; font-size: .72rem; line-height: 1.55; background: #ede9f7; border-radius: 15px; }
.report-evidence-note strong { color: var(--purple-dark); white-space: nowrap; }
.report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-block { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 20px; }
.report-block-title { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.report-block-title small { color: var(--ink-soft); font-size: .55rem; font-weight: 900; letter-spacing: .11em; }
.report-block-title h4,
.report-plan h4 { margin: 3px 0 0; font-size: .92rem; }
.report-dot { width: 11px; height: 11px; border-radius: 50%; }
.report-dot.stable { background: var(--green); box-shadow: 0 0 0 5px #e3f5ee; }
.report-dot.focus { background: var(--coral); box-shadow: 0 0 0 5px #ffebe8; }
.report-dot.review { background: var(--yellow); box-shadow: 0 0 0 5px #fff3d7; }
.report-dot.school { background: var(--blue); box-shadow: 0 0 0 5px #e7f3fb; }
.report-dot.cycle { background: var(--green); box-shadow: 0 0 0 5px #e3f5ee; }
.report-dot.process { background: #8f75db; box-shadow: 0 0 0 5px #eee9fb; }
.report-evidence-list { display: grid; gap: 8px; }
.report-evidence-list article { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 11px 12px; background: #faf9fc; border-radius: 13px; }
.report-evidence-list article > div { display: grid; gap: 2px; }
.report-evidence-list article strong { font-size: .7rem; }
.report-evidence-list article span,
.report-evidence-list article small { color: var(--ink-soft); font-size: .62rem; }
.report-evidence-list article > b { align-self: center; grid-row: span 2; color: var(--purple); font-size: .73rem; }
.report-evidence-list article > small { grid-column: 1 / -1; }
.report-empty { margin: 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.65; }
.report-review-block { display: grid; grid-template-columns: minmax(170px, .4fr) 1fr; align-items: center; gap: 20px; }
.report-review-block .report-block-title { margin: 0; }
.report-process-block { display: grid; grid-template-columns: minmax(170px, .4fr) 1fr; gap: 20px; }
.report-process-block .report-block-title { margin: 0; }
.report-process-summary { display: grid; gap: 5px; margin-bottom: 10px; }
.report-process-summary strong { color: var(--purple); font-size: .73rem; }
.report-process-summary span { color: var(--ink-soft); font-size: .68rem; line-height: 1.6; }
.report-process-note { margin: 11px 0 0; color: var(--ink-soft); font-size: .61rem; line-height: 1.55; }
.review-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.review-chip-row span { display: inline-flex; gap: 7px; padding: 8px 11px; color: #745713; font-size: .68rem; background: #fff4d7; border-radius: 10px; }
.report-plan { display: grid; grid-template-columns: minmax(170px, .4fr) 1fr; gap: 20px; padding: 22px; color: white; background: #30294b; border-radius: 20px; }
.report-plan .eyebrow { color: #beaefa; }
.report-plan ol { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: rgba(255,255,255,.82); font-size: .72rem; line-height: 1.65; }
.report-print-note { display: none; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 300; max-width: min(380px, calc(100vw - 40px)); padding: 13px 18px; color: white; font-size: .8rem; background: #332956; border-radius: 14px; box-shadow: 0 15px 40px rgba(33,23,65,.28); opacity: 0; pointer-events: none; transform: translateY(12px); transition: 180ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: auto 1fr; gap: 18px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; order: 3; }
  .top-actions { justify-self: end; }
  .home-grid { grid-template-columns: 1fr; }
  .daily-goal-card { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .goal-ring-wrap { grid-template-columns: auto minmax(180px, 1fr); align-items: center; gap: 24px; text-align: left; }
  .goal-ring { width: 120px; height: 120px; margin: 0; }
  .goal-ring::before { width: 92px; height: 92px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-skill-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-two { grid-column: span 2; }
  .span-three { grid-column: span 2; }
  .recommendation-card { grid-column: span 2; }
}

@media (max-width: 820px) {
  .auth-screen { grid-template-columns: 1fr; width: min(680px, calc(100% - 24px)); margin: 12px auto; border-radius: 26px; }
  .auth-brand-panel { padding: 32px 28px; }
  .auth-brand-mark { margin-bottom: 22px; }
  .auth-brand-panel h1 { max-width: 600px; font-size: 2.15rem; }
  .auth-brand-panel ul { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
  .auth-brand-panel li { align-items: flex-start; font-size: .66rem; }
  .auth-card { padding: 32px 28px; }
  .account-bar { padding: 6px 16px; }
  .account-manage-button > span:last-child { display: none; }
  .topbar { position: static; grid-template-columns: 1fr auto; padding: 12px 18px; }
  .topbar { backdrop-filter: none; }
  .main-nav { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 50; justify-content: space-around; padding: 8px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 40px rgba(49,36,81,.18); backdrop-filter: blur(18px); }
  .nav-button { flex: 1; flex-direction: column; gap: 2px; padding: 7px; font-size: .68rem; }
  .nav-button span { font-size: 1rem; }
  .profile-chip { min-width: 0; }
  .profile-copy,
  .profile-chip > span:last-child,
  .parent-entry span { display: none; }
  .parent-entry { font-size: .72rem; }
  .install-button { display: none !important; }
  main { padding: 22px 16px 105px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-copy { padding: 37px 28px 24px; }
  .planet-scene { min-height: 255px; }
  .planet { top: 35px; left: calc(50% - 87px); }
  .orbit-one { inset: 8px 5% 18px; }
  .orbit-two { inset: 32px 13% 43px; }
  .progress-bubble { right: 24px; bottom: 15px; }
  .task-grid { grid-template-columns: 1fr; }
  .twin-section,
  .growth-layout { grid-template-columns: 1fr; }
  .growth-summary,
  .parent-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-header,
  .page-heading { align-items: flex-start; flex-direction: column; }
  .parent-plan-card .card-heading { align-items: flex-start; flex-direction: column; }
  .parent-plan-card .data-caption { text-align: left; }
  .parent-skill-path-card .card-heading { align-items: flex-start; flex-direction: column; }
  .parent-skill-path-card .data-caption { text-align: left; }
  .curriculum-profile-card { grid-template-columns: auto 1fr; }
  .curriculum-track-list { grid-column: 1 / -1; }
  .content-library-card { grid-template-columns: auto 1fr; }
  .content-library-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .data-safety-card { grid-template-columns: auto 1fr; }
  .data-safety-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .device-install-card { grid-template-columns: auto 1fr; }
  .device-install-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .parent-header-actions { justify-content: flex-start; }
  .lesson-modal { min-height: calc(100vh - 20px); max-height: calc(100vh - 20px); overflow: auto; border-radius: 24px; }
  .lesson-header { position: sticky; top: 0; z-index: 3; grid-template-columns: 1fr auto; padding: 15px; }
  .lesson-progress-wrap { grid-row: 2; grid-column: 1 / -1; }
  .lesson-body { min-height: calc(100vh - 130px); padding: 28px 20px; }
  .option-grid { grid-template-columns: 1fr; }
  .report-modal-header,
  .report-modal-actions { align-items: flex-start; }
  .report-modal-actions { flex-direction: column; }
  .report-modal-actions > div { width: 100%; }
  .report-modal-actions button { flex: 1; }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .report-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-columns { grid-template-columns: 1fr; }
  .onboarding-modal { grid-template-columns: 1fr; }
  .onboarding-intro { min-height: auto; padding: 30px; }
  .onboarding-orbit { display: none; }
  .onboarding-intro h2 { margin-top: 24px; }
  .onboarding-intro ul { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
  .onboarding-intro li { align-items: flex-start; }
}

@media (max-width: 600px) {
  .auth-screen { width: calc(100% - 12px); margin: 6px auto; border-radius: 22px; }
  .auth-brand-panel { padding: 28px 22px; }
  .auth-brand-panel h1 { font-size: 1.8rem; }
  .auth-brand-panel p { font-size: .75rem; }
  .auth-brand-panel ul { grid-template-columns: 1fr; gap: 8px; }
  .auth-brand-mark { width: 48px; height: 48px; margin-bottom: 19px; }
  .auth-card { min-height: 470px; padding: 26px 20px; }
  .auth-grid { grid-template-columns: 1fr; }
  .account-bar { gap: 8px; min-height: 40px; padding: 5px 11px; }
  .account-family-button { min-width: 0; }
  .account-family-button strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-family-button > span:last-child { display: none; }
  .sync-status { margin-left: auto; }
  .sync-status span { display: none; }
  .account-manage-button { margin-left: 0; padding: 2px; }
  .family-modal { padding: 24px 16px; }
  .family-overview,
  .family-two-column,
  .family-child-grid { grid-template-columns: 1fr; }
  .family-inline-form { grid-template-columns: 1fr 1fr; }
  .family-inline-form button { width: 100%; }
  .family-section { padding: 15px; }
  .family-section-heading { align-items: flex-start; }
  .invite-result { grid-template-columns: 1fr; }
  .family-modal-footer { align-items: stretch; flex-direction: column; }
  .migration-actions { flex-direction: column-reverse; }
  .brand small { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  .brand strong { font-size: .9rem; }
  .top-actions { gap: 5px; }
  .parent-entry { min-height: 38px; padding: 0 10px; }
  .profile-chip { padding: 5px; border: 0; background: transparent; }
  .avatar { width: 36px; height: 36px; }
  .hero-copy h1 { font-size: 1.85rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-meta { gap: 10px 16px; }
  .daily-goal-card { display: block; }
  .goal-ring-wrap { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .course-grid { grid-template-columns: 1fr; }
  .parent-plan-list { grid-template-columns: 1fr; }
  .parent-skill-paths { grid-template-columns: 1fr; }
  .parent-plan-item { padding: 14px; }
  .parent-plan-copy small { white-space: normal; }
  .curriculum-profile-card { grid-template-columns: 1fr; }
  .curriculum-profile-icon { display: none; }
  .curriculum-track-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-library-card { grid-template-columns: 1fr; }
  .content-library-icon { display: none; }
  .content-library-actions { display: grid; grid-template-columns: 1fr; }
  .content-library-actions > * { width: 100%; }
  .installed-pack-item { grid-template-columns: minmax(0, 1fr) auto; }
  .installed-pack-mark { display: none; }
  .data-safety-card { grid-template-columns: 1fr; }
  .data-safety-icon { display: none; }
  .data-safety-actions { display: grid; grid-template-columns: 1fr; }
  .device-install-card { grid-template-columns: 1fr; }
  .device-install-icon { display: none; }
  .device-install-actions { display: grid; grid-template-columns: 1fr; }
  .restore-preview-grid { grid-template-columns: 1fr 1fr; }
  .content-pack-preview-stats { grid-template-columns: 1fr 1fr 1fr; }
  .restore-actions { flex-direction: column-reverse; }
  .restore-actions button { width: 100%; }
  .course-card { min-height: 265px; }
  .growth-summary,
  .parent-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { align-items: flex-start; flex-direction: column; padding: 17px; }
  .metric-copy strong { font-size: 1.2rem; }
  .parent-grid { grid-template-columns: 1fr; }
  .span-two,
  .span-three,
  .recommendation-card { grid-column: auto; }
  .process-evidence-summary { grid-template-columns: 1fr; gap: 8px; }
  .process-evidence-row { grid-template-columns: 92px 1fr 38px; gap: 8px; }
  .content-cycle-metrics { grid-template-columns: 1fr; }
  .error-reason-chip { flex: 1 1 calc(50% - 8px); min-height: 42px; }
  .subject-table-head { display: none; }
  .subject-table-row { grid-template-columns: 1fr 1fr; padding: 14px 4px; }
  .mastery-row { grid-template-columns: 112px 1fr 60px; }
  .skill-path-steps { grid-template-columns: 1fr; }
  .skill-path-step { align-items: center; }
  .small-modal,
  .settings-modal { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .weekly-focus-fieldset legend { align-items: flex-start; flex-direction: column; gap: 5px; }
  .weekly-focus-fieldset legend small { text-align: left; }
  .weekly-focus-options { grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: 1fr; }
  .baseline-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-layer { padding: 8px; }
  .report-modal { max-height: calc(100vh - 16px); border-radius: 22px; }
  .report-modal-header,
  .report-modal-actions { padding: 15px; }
  .report-modal-body { padding: 12px; }
  .report-hero { min-height: 0; padding: 23px; }
  .evidence-badge { width: 100%; }
  .report-stat { padding: 15px; }
  .report-evidence-note { grid-template-columns: 1fr; gap: 5px; }
  .report-review-block,
  .report-process-block,
  .report-plan { grid-template-columns: 1fr; }
  .baseline-banner { grid-template-columns: auto 1fr; padding: 18px; }
  .baseline-banner .primary-button { grid-column: 1 / -1; width: 100%; }
  .onboarding-modal { max-height: calc(100vh - 16px); border-radius: 22px; }
  .onboarding-intro { padding: 25px 22px; }
  .onboarding-intro ul { grid-template-columns: 1fr; gap: 7px; }
  .onboarding-form { padding: 24px 20px; }
  .onboarding-grid,
  .grade-choice { grid-template-columns: 1fr; }
  .onboarding-actions { flex-direction: column-reverse; }
  .onboarding-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { margin: 12mm; }
  body.printing-report { overflow: visible !important; background: white; }
  body.printing-report > .app-shell,
  body.printing-report > .ambient,
  body.printing-report > .modal-layer:not(#weekly-report-modal),
  body.printing-report > .toast { display: none !important; }
  body.printing-report #weekly-report-modal { position: static; display: block !important; padding: 0; background: white; backdrop-filter: none; }
  body.printing-report #weekly-report-modal .report-modal { width: 100%; max-height: none; overflow: visible; background: white; border-radius: 0; box-shadow: none; }
  body.printing-report .report-modal-header,
  body.printing-report .report-modal-actions { display: none !important; }
  body.printing-report .report-modal-body { padding: 0; }
  body.printing-report .report-sheet { max-width: none; }
  body.printing-report .report-hero,
  body.printing-report .report-stat,
  body.printing-report .report-block,
  body.printing-report .report-plan { break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.printing-report .report-print-note { display: block; margin: 0; padding-top: 8px; color: var(--ink-soft); font-size: 9pt; line-height: 1.55; }
}
