/* Personal Tutor: onboarding, family, check-in and the new landing page.
   Builds on edusmart.css (same tokens). Phone first; classes start with "tu-". */

:root {
  /* The accent is the sky blue of the EduSmart shield (the "gold" names are kept so nothing else has to change) */
  --tu-gold: #1592D3;
  --tu-gold-deep: #0B78B5;
  --tu-gold-soft: #E6F4FB;
  --tu-gold-ink: #075E8A;
  --tu-warm: #5B4BDB;
  --tu-warm-soft: #EEEBFD;
  --tu-ease: cubic-bezier(.2, .8, .2, 1);
}

.es-btn-ghost, .es-page a.es-btn-ghost { background: transparent; color: var(--es-muted); }
.es-btn-ghost:hover, .es-page a.es-btn-ghost:hover { background: var(--es-tint); color: var(--es-ink); }
.tu-btn-gold, .es-page a.tu-btn-gold { background: var(--tu-gold); color: #fff; }
.tu-btn-gold:hover, .es-page a.tu-btn-gold:hover { background: var(--tu-gold-deep); color: #fff; }
.tu-btn-whatsapp { background: #25D366; }
.tu-btn-whatsapp:hover { background: #1EB955; }
.tu-small { font-size: 13px; }

/* ---------- Onboarding shell ---------- */
.tu-flow { background: linear-gradient(180deg, var(--es-tint) 0, #fff 320px); }
.tu-flow-wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
.tu-flow-bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px);
               border-bottom: 1px solid var(--es-line); }
.tu-flow-bar .tu-flow-wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.tu-flow-logo { margin: 0 auto; display: flex; }
.tu-flow-logo img { height: 18px; width: auto; }
.tu-back, .tu-back-spacer { width: 40px; height: 40px; flex: none; }
.tu-back { border: 0; border-radius: 12px; background: var(--es-tint); color: var(--es-ink); font-size: 26px; line-height: 1; cursor: pointer; }
.tu-back:hover { background: var(--es-line); }
.tu-flow-count { width: 64px; text-align: right; font-size: 13px; font-weight: 600; color: var(--es-muted); flex: none; }
.tu-progress { height: 4px; background: var(--es-line); overflow: hidden; }
.tu-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--es-blue), var(--es-royal));
                    transition: width .4s var(--tu-ease); border-radius: 0 4px 4px 0; }
.tu-progress-inline { border-radius: 4px; margin: 8px 0 20px; }
.tu-flow-main { flex: 1; padding: 28px 0 48px; animation: tu-rise .35s var(--tu-ease); }
@keyframes tu-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tu-q { font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--es-royal-deep); margin: 0 0 10px; letter-spacing: -.2px; }
.tu-hint { color: var(--es-muted); margin: 0 0 18px; }
.tu-label { font-weight: 700; font-size: 14px; margin: 18px 0 8px; }
.tu-h2 { font-size: 18px; margin: 24px 0 10px; }
.tu-under { text-align: center; font-size: 14px; color: var(--es-muted); margin-top: 18px; }
.tu-next { margin-top: 24px; }
.tu-skip { margin-top: 8px; }
.tu-section { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--es-line); }
.tu-consent { margin: 18px 0 10px; padding: 14px; background: var(--es-tint); border-radius: 14px; line-height: 1.45; }
.tu-note { background: var(--es-blue-soft); border-radius: 14px; padding: 14px 16px; margin: 6px 0 16px; }
.tu-note > b:first-child { display: block; margin-bottom: 4px; }

/* Big tap cards */
.tu-cards { display: grid; gap: 12px; }
.tu-card-choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; min-height: 72px;
                  background: #fff; border: 1.5px solid var(--es-line); border-radius: 18px; cursor: pointer; font: inherit; color: inherit;
                  box-shadow: 0 2px 8px rgba(18, 22, 63, .04); transition: border-color .15s, transform .15s var(--tu-ease), box-shadow .15s; }
.tu-card-choice:hover { border-color: var(--es-blue); transform: translateY(-1px); box-shadow: var(--es-shadow); }
.tu-card-choice.is-on { border-color: var(--es-royal); background: #F3F4FF; box-shadow: 0 0 0 3px rgba(0, 0, 150, .08); }
.tu-card-choice b { display: block; font-size: 16px; }
.tu-card-choice small { display: block; color: var(--es-muted); font-size: 14px; margin-top: 2px; }
.tu-emoji { font-size: 28px; line-height: 1; flex: none; width: 36px; text-align: center; }
.tu-cards-grid { grid-template-columns: 1fr 1fr; }
.tu-card-small { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 14px; }
.tu-card-small b { font-size: 14px; line-height: 1.3; }

/* Chips */
.tu-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tu-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
           background: #fff; border: 1.5px solid var(--es-line); color: var(--es-ink); font: inherit; font-size: 15px; font-weight: 500;
           transition: background .15s, border-color .15s, transform .1s; }
.tu-chip:hover { border-color: var(--es-blue); }
.tu-chip:active { transform: scale(.97); }
.tu-chip.is-on { background: var(--es-royal); border-color: var(--es-royal); color: #fff; }
.tu-chip.is-on.is-good { background: var(--es-success); border-color: var(--es-success); }
.tu-chip.is-on.is-warm { background: var(--tu-warm); border-color: var(--tu-warm); }
.tu-chips-tight .tu-chip { min-width: 52px; justify-content: center; padding: 0 12px; }
.tu-chips-static .tu-chip { cursor: default; min-height: 32px; font-size: 13px; padding: 0 12px; background: var(--es-tint); border-color: transparent; }
.tu-soon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--tu-gold-deep); }
.tu-chip.is-on .tu-soon { color: var(--tu-gold); }

/* Report photo */
.tu-upload { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 16px; margin-bottom: 12px; cursor: pointer;
             border: 2px dashed #B9C4DD; border-radius: 20px; background: #fff; transition: border-color .15s, background .15s; }
.tu-upload:hover { border-color: var(--es-blue); background: var(--es-blue-soft); }
.tu-upload .tu-emoji { font-size: 36px; width: auto; }
.tu-upload small { color: var(--es-muted); }
.tu-reading { display: grid; justify-items: center; gap: 8px; padding: 36px 0; color: var(--es-muted); }
.tu-marks { display: grid; gap: 8px; margin-bottom: 8px; }
.tu-mark-row { display: grid; grid-template-columns: 1fr 96px 36px; gap: 8px; align-items: center; }
.tu-mark-num { position: relative; }
.tu-mark-num input { padding-right: 26px; }
.tu-mark-num span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--es-muted); }
.tu-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--es-tint); font-size: 20px; cursor: pointer; color: var(--es-muted); }

/* Summary */
.tu-facts { display: grid; gap: 10px; margin: 18px 0; }
.tu-facts > div { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--es-line); border-radius: 14px; padding: 12px 14px; }
.tu-facts span { font-size: 20px; line-height: 1.3; }
.tu-facts p { margin: 0; }
.tu-help { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tu-help li { position: relative; padding-left: 30px; }
.tu-help li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
                      background: var(--es-success-soft); color: var(--es-success); font-weight: 700; font-size: 13px; display: grid; place-items: center; }

/* Done */
.tu-done, .tu-intro { text-align: center; }
.tu-done .tu-note, .tu-done .tu-link-card { text-align: left; }
.tu-done-badge { width: 84px; height: 84px; margin: 8px auto 16px; border-radius: 28px; display: grid; place-items: center; font-size: 42px;
                 background: linear-gradient(135deg, var(--tu-gold-soft), var(--es-blue-soft)); animation: tu-pop .5s var(--tu-ease); }
@keyframes tu-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }

.tu-link-card { background: #fff; border: 1.5px solid var(--es-line); border-radius: 18px; padding: 16px; margin: 16px 0; box-shadow: var(--es-shadow); }
.tu-link-url { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--es-tint); border-radius: 10px; padding: 10px 12px;
               word-break: break-all; margin: 10px 0; }
.tu-link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }

/* ---------- Family ---------- */
.tu-children { display: grid; gap: 16px; }
@media (min-width: 900px) { .tu-children { grid-template-columns: 1fr 1fr; } }
.tu-child { background: #fff; border: 1px solid var(--es-line); border-radius: 20px; padding: 16px; box-shadow: var(--es-shadow); display: grid; gap: 12px; }
.tu-child-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tu-child-head .es-grow { min-width: 150px; }
.tu-child-head h3 { margin: 0; font-size: 18px; }
.tu-child-avatar { width: 48px; height: 48px; border-radius: 16px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 20px;
                   color: #fff; background: linear-gradient(135deg, var(--es-blue), var(--es-royal)); }
.tu-plan { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--es-tint); color: var(--es-muted); white-space: nowrap; }
.tu-plan.is-on { background: var(--tu-gold-soft); color: var(--tu-gold-ink); }
.tu-child-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tu-child-foot p { margin: 0; }
.tu-child .tu-link-card { margin: 0; box-shadow: none; }
.tu-report-soon { display: flex; gap: 10px; align-items: flex-start; background: var(--es-tint); border-radius: 14px; padding: 12px; font-size: 14px; }
.tu-report-soon p { margin: 0; }
.tu-add-child { margin-top: 20px; }

/* ---------- Phase 2: dashboard ---------- */
.tu-dash-hero { padding-bottom: 20px; }
.tu-dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.tu-stat-card { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
                border-radius: 18px; padding: 12px 14px; color: #fff; }
.tu-stat-card b { display: block; font-size: 24px; line-height: 1.1; }
.tu-stat-card small { color: var(--es-on-royal); font-size: 13px; }
.tu-stat-wide { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 8px; }
.tu-stat-wide b { font-size: 16px; }
.tu-of { font-size: 14px; opacity: .7; font-weight: 600; }
.tu-flame { font-size: 30px; filter: grayscale(1) opacity(.5); transition: filter .3s; }
.tu-flame.is-lit { filter: none; animation: tu-flicker 2.4s ease-in-out infinite; }
@keyframes tu-flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }

.tu-ring { width: 44px; height: 44px; transform: rotate(-90deg); flex: none; }
.tu-ring circle { fill: none; stroke-width: 5; }
.tu-ring-bg { stroke: rgba(255, 255, 255, .18); }
.tu-ring-fg { stroke: var(--tu-gold); stroke-linecap: round; transition: stroke-dasharray .8s var(--tu-ease); }
.tu-ring-sm { width: 52px; height: 52px; }
.tu-ring-sm .tu-ring-bg { stroke: var(--es-line); }
.tu-ring-blue { stroke: var(--es-blue); }
.tu-ring text { transform: rotate(90deg); transform-origin: 22px 22px; font: 700 10px var(--es-font); fill: var(--es-ink); }

.tu-week { list-style: none; display: flex; justify-content: space-between; gap: 6px; margin: 16px 0 0; padding: 0; }
.tu-week li { display: grid; justify-items: center; gap: 4px; flex: 1; }
.tu-week span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
                background: rgba(255, 255, 255, .1); border: 1.5px dashed rgba(255, 255, 255, .3); color: #fff; }
.tu-week .is-on span { background: var(--es-blue); border: 0; }
.tu-week .is-goal span { background: var(--tu-gold); border: 0; color: #fff; }
.tu-week small { font-size: 11px; color: var(--es-on-royal); }

.tu-trial-note { background: var(--tu-gold-soft); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; }

.tu-up-next { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; text-decoration: none; color: #fff;
              background: linear-gradient(135deg, var(--es-royal), #2A2FD0); box-shadow: 0 14px 32px rgba(0, 0, 150, .25);
              transition: transform .15s var(--tu-ease); }
.es-page a.tu-up-next { color: #fff; }
.tu-up-next:hover { transform: translateY(-2px); }
.tu-up-icon { width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-size: 28px; flex: none; }
.tu-up-next b { display: block; font-size: 18px; line-height: 1.25; }
.tu-up-next small { display: block; color: var(--es-on-royal); margin-top: 2px; }
.tu-up-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #7FD3F2; }
.tu-up-go { background: #fff; color: var(--es-royal); font-weight: 700; border-radius: 12px; padding: 10px 14px; white-space: nowrap; }
.tu-kind-checkin { background: linear-gradient(135deg, #0B6E99, var(--es-blue)); }
.tu-kind-review, .tu-kind-done { background: linear-gradient(135deg, #2B2F7A, #4C4FC4); }
.tu-kind-revisit { background: linear-gradient(135deg, #2E2390, var(--tu-warm)); }
@media (max-width: 480px) { .tu-up-go { display: none; } }

.tu-subjects { display: grid; gap: 10px; }
.tu-subject { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--es-line); border-radius: 18px;
              padding: 12px 14px; text-decoration: none; color: var(--es-ink); box-shadow: 0 2px 10px rgba(18, 22, 63, .04); }
.es-page a.tu-subject { color: var(--es-ink); }
.tu-subject:hover { border-color: var(--es-blue); }
.tu-subject b { display: block; }
.tu-subject small { display: block; color: var(--es-muted); font-size: 13px; }
.tu-subject small.tu-subject-next { color: var(--es-blue); }
.tu-subject small.tu-subject-paused { color: var(--es-muted); }

.tu-focus ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tu-week-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tu-week-stats div { background: var(--es-tint); border-radius: 14px; padding: 12px; }
.tu-week-stats b { display: block; font-size: 22px; color: var(--es-royal-deep); }
.tu-week-stats small { color: var(--es-muted); }
.tu-badges-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tu-badge { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--es-tint); }
.tu-badge span { font-size: 26px; filter: grayscale(1) opacity(.35); }
.tu-badge small { font-size: 11px; color: var(--es-muted); line-height: 1.2; }
.tu-badge.is-earned { background: var(--tu-gold-soft); }
.tu-badge.is-earned span { filter: none; }
.tu-badge.is-earned small { color: var(--es-ink); font-weight: 600; }

/* ---------- Phase 2: topics map ---------- */
.tu-next-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; margin-bottom: 16px; text-decoration: none;
                color: #fff; background: linear-gradient(135deg, var(--es-royal), #2A2FD0); }
.es-page a.tu-next-card { color: #fff; }
.tu-next-card b { display: block; font-size: 17px; }
.tu-next-card small { color: var(--es-on-royal); }
.tu-next-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--tu-gold); color: #fff; display: grid; place-items: center; flex: none; }
.tu-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--es-muted); margin: 0 0 12px; }
.tu-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tu-dot-new { background: #C9CFDD; }
.tu-topic-list { display: grid; gap: 10px; }
.tu-topic { background: #fff; border: 1px solid var(--es-line); border-radius: 18px; overflow: hidden; }
.tu-topic-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; cursor: pointer;
                 text-align: left; font: inherit; color: inherit; }
.tu-topic-head b { display: block; margin-bottom: 6px; }
.tu-topic-head .tu-bar { display: block; height: 6px; }
.tu-topic-n { width: 34px; height: 34px; border-radius: 10px; background: var(--es-royal); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.tu-topic-pct { font-weight: 700; font-size: 14px; color: var(--es-muted); }
.tu-sub-list { border-top: 1px solid var(--es-line); }
.tu-sub { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--es-ink); border-bottom: 1px solid var(--es-tint); }
.es-page a.tu-sub { color: var(--es-ink); }
.tu-sub:hover { background: var(--es-tint); }
.tu-sub.is-next { background: #F3F4FF; }
.tu-sub-name { display: block; font-weight: 600; }
.tu-sub small { color: var(--es-muted); font-size: 13px; }
.tu-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--es-royal); color: #fff; white-space: nowrap; }
.tu-pill-warm { background: var(--tu-warm-soft); color: #3B2DA8; }

/* ---------- Phase 2: practice ---------- */
.tu-mastery-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--es-muted); }
.tu-mastery-line .tu-bar { flex: 1; height: 8px; }
.tu-mastery-line .tu-bar span { transition: width .6s var(--tu-ease); animation: none; }
.tu-mastery-big { margin: 16px auto 8px; max-width: 360px; font-size: 15px; }
.tu-hint-box { background: var(--tu-gold-soft); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; }
.tu-xp { display: inline-block; margin-left: 8px; background: var(--tu-gold); color: #fff; font-weight: 700; font-size: 13px;
         border-radius: 999px; padding: 2px 10px; animation: tu-pop .4s var(--tu-ease); }
.tu-celebrate { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--tu-gold-soft), var(--es-success-soft));
                animation: tu-pop .5s var(--tu-ease); }
.tu-toast { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 50; background: var(--es-ink); color: #fff;
            padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: tu-rise .3s var(--tu-ease); font-weight: 600; }
.tu-results .tu-done-badge { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .tu-flame.is-lit, .tu-xp, .tu-celebrate, .tu-toast { animation: none; } }

/* ---------- Phase 3: parent reports ---------- */
.tu-family-week { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: #F3F4FF; text-decoration: none; color: var(--es-ink); }
.es-page a.tu-family-week { color: var(--es-ink); }
.tu-family-week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tu-family-week-head small { color: var(--es-muted); }
.tu-family-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.tu-family-stats b { display: block; color: var(--es-royal-deep); font-size: 16px; }
.tu-family-stats small { color: var(--es-muted); font-size: 12px; }
a.tu-report-latest, .es-page a.tu-report-latest { text-decoration: none; color: var(--es-ink); background: var(--tu-gold-soft); }
.tu-older summary { cursor: pointer; font-size: 14px; color: var(--es-blue); }
.tu-older a { display: block; font-size: 14px; padding: 4px 0; }
.tu-report-headline { font-size: 18px; line-height: 1.5; margin: 0 0 16px; }
.tu-report-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.tu-report-numbers div { background: var(--es-tint); border-radius: 14px; padding: 12px; }
.tu-report-numbers b { display: block; font-size: 22px; color: var(--es-royal-deep); }
.tu-report-numbers small { color: var(--es-muted); margin-right: 6px; }
.tu-report-numbers i, .tu-delta { font-style: normal; font-size: 13px; font-weight: 700; }
.is-up { color: var(--es-success); }
.is-down { color: var(--es-danger); }
.tu-plain-list { margin: 0; padding-left: 18px; }
@media (min-width: 720px) { .tu-report-numbers { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Phase 4: plans ---------- */
.tu-plan-picker { display: grid; gap: 10px; margin-top: 12px; }
.tu-plan-option { position: relative; display: grid; gap: 2px; text-align: left; padding: 16px; border-radius: 16px; cursor: pointer; font: inherit;
                  color: var(--es-ink); background: #fff; border: 1.5px solid var(--es-line); transition: border-color .15s, box-shadow .15s; }
.tu-plan-option:hover { border-color: var(--es-blue); }
.tu-plan-option.is-on { border-color: var(--es-royal); box-shadow: 0 0 0 3px rgba(0, 0, 150, .1); background: #F3F4FF; }
.tu-plan-name { font-weight: 700; color: var(--es-muted); font-size: 14px; }
.tu-plan-price { font-size: 26px; font-weight: 800; color: var(--es-royal-deep); }
.tu-plan-price small { font-size: 14px; font-weight: 600; color: var(--es-muted); margin-left: 2px; }
.tu-plan-note { font-size: 13px; color: var(--es-success); font-weight: 600; }
.tu-plan-option .tu-ribbon { top: -10px; }
.tu-plan-status { background: var(--tu-gold-soft); color: var(--es-ink); }
.tu-keep { min-height: 46px; font-size: 15px; }
.tu-paused { background: linear-gradient(135deg, #3A3F66, #5D6380); }
.tu-trial-note a { font-weight: 700; margin-left: 6px; }
@media (min-width: 640px) { .tu-plan-picker { grid-template-columns: repeat(3, 1fr); } }

/* The one-subject plan, under the three full-plan cards */
.tu-plan-one { margin-top: 10px; border-radius: 16px; background: #fff; border: 1.5px dashed var(--es-line); transition: border-color .15s, box-shadow .15s; }
.tu-plan-one:hover { border-color: var(--es-blue); }
.tu-plan-one.is-on { border-style: solid; border-color: var(--es-royal); box-shadow: 0 0 0 3px rgba(0, 0, 150, .1); background: #F3F4FF; }
.tu-plan-one-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; font: inherit;
                    color: var(--es-ink); background: none; border: 0; cursor: pointer; }
.tu-plan-one-head .tu-plan-name, .tu-plan-one-head .tu-plan-note { display: block; }
.tu-plan-one-head .tu-plan-note { color: var(--es-muted); font-weight: 500; margin-top: 2px; }
.tu-plan-one-head .tu-plan-price { font-size: 22px; white-space: nowrap; }
.tu-plan-one-subjects { padding: 0 16px 14px; }
.tu-plan-one-subjects .tu-small { margin: 0 0 6px; font-weight: 700; }

/* Written answers in lesson practice */
.tu-written { font-size: 17px; }
.tu-written.is-right { border-color: var(--es-success); background: var(--es-success-soft); }
.tu-written.is-wrong { border-color: var(--es-danger); background: var(--es-danger-soft); }

/* ---------- Subject check-in ---------- */
.tu-checkin { max-width: 640px; }
.tu-checkin-card { border: 1.5px solid var(--tu-gold); background: linear-gradient(135deg, #fff, var(--tu-gold-soft)); }
.tu-checkin-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: #fff; flex: none; }
.tu-quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--es-muted); }
.tu-topic-tag { background: var(--es-blue-soft); color: #00658C; border-radius: 999px; padding: 4px 10px; font-size: 12px;
                max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-quiz-q { font-size: 19px; font-weight: 600; line-height: 1.45; margin-bottom: 18px; white-space: pre-line; }
.tu-options { display: grid; gap: 10px; }
.tu-option { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; cursor: pointer;
             border: 1.5px solid var(--es-line); background: #fff; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.tu-option:hover { border-color: var(--es-blue); }
.tu-option.is-on { border-color: var(--es-royal); background: #F3F4FF; }
.tu-option-key { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 700;
                 background: var(--es-tint); color: var(--es-royal); }
.tu-option.is-on .tu-option-key { background: var(--es-royal); color: #fff; }
.tu-option-text { padding-top: 4px; }
.tu-option-unsure { border-style: dashed; color: var(--es-muted); }

.tu-result-block { border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.tu-result-block h2 { font-size: 15px; margin: 0 0 4px; }
.tu-result-block p { margin: 0; }
.tu-good { background: var(--es-success-soft); }
.tu-warm { background: var(--tu-warm-soft); }
.tu-topic-bars { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.tu-topic-bars li { display: grid; gap: 4px; }
.tu-topic-name { font-size: 14px; font-weight: 600; }
.tu-bar { height: 10px; border-radius: 999px; background: var(--es-tint); overflow: hidden; }
.tu-bar span { display: block; height: 100%; border-radius: 999px; animation: tu-grow .8s var(--tu-ease); transform-origin: left; }
@keyframes tu-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tu-band-strong { background: var(--es-success); }
.tu-band-developing { background: var(--es-blue); }
.tu-band-focus { background: var(--tu-warm); }
.tu-start-here { background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); color: #fff; border-radius: 20px; padding: 20px; margin: 20px 0 10px; }
.tu-start-here .es-eyebrow { color: #7FD3F2; }
.tu-start-here h2 { margin: 0; font-size: 20px; }
.tu-start-here p { color: var(--es-on-royal); margin: 4px 0 16px; }
.es-page .tu-start-here a.es-btn { background: var(--tu-gold); color: #fff; }

@media (min-width: 720px) {
  .tu-q { font-size: 32px; }
  .tu-flow-main { padding-top: 44px; }
}

/* ---------- Landing page ---------- */
/* Royal blue sections, the shield's sky blue for buttons and highlights, white cards. Phone first. */
.tu-home { background: #fff; }
.tu-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--tu-gold); margin: 0 0 6px; }
.tu-eyebrow-light { color: #7FD3F2; }
.tu-section-block { padding: 56px 0; }
.tu-h2-big { font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--es-ink); margin: 0 0 14px; letter-spacing: -.3px; }
.tu-body { font-size: 17px; color: var(--es-muted); margin: 0 0 20px; }
.tu-split { display: grid; gap: 28px; align-items: center; }
.es-page a.tu-btn-white, .tu-btn-white { background: #fff; color: var(--es-royal); }
.es-page a.tu-btn-white:hover, .tu-btn-white:hover { background: var(--es-tint); color: var(--es-royal); }
.tu-ribbon { position: absolute; top: -11px; right: 16px; background: var(--tu-gold); color: #fff; font-size: 12px; font-weight: 700;
             padding: 4px 10px; border-radius: 999px; }
.tu-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.tu-dot-good { background: var(--es-success); }
.tu-dot-warm { background: var(--tu-warm); }
.tu-dot-blue { background: var(--es-blue); }

/* Hero: text on royal blue, the students photo on the right (below the text on phones) */
.tu-hero { position: relative; overflow: hidden; color: #fff; background: var(--es-royal); display: flex; flex-direction: column-reverse; }
.tu-hero-photo { display: block; width: 100%; height: 260px; object-fit: cover; object-position: 50% 20%; }
.tu-hero-grid { position: relative; z-index: 1; padding-top: 32px; padding-bottom: 32px; }
.tu-kicker { display: inline-block; font-size: 13px; font-weight: 700; color: var(--es-royal); background: #fff; padding: 5px 14px;
             border-radius: 999px; margin: 0 0 14px; }
.tu-hero h1 { font-size: 36px; line-height: 1.08; font-weight: 800; margin: 0 0 14px; letter-spacing: -.5px; }
.tu-lead { font-size: 17px; color: var(--es-on-royal); margin: 0 0 22px; max-width: 520px; }
.tu-hero-cta { display: flex; gap: 10px; }
/* Phones: the two buttons share the row equally, never stacked */
.tu-hero-cta .es-btn { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 15px; white-space: nowrap; }
@media (min-width: 560px) { .tu-hero-cta .es-btn { flex: 0 0 auto; padding: 0 22px; font-size: 16px; } }
.tu-hero-note { font-size: 14px; color: var(--es-on-royal); margin: 14px 0 0; }

/* How it works: four royal blue tiles */
.tu-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.tu-steps li { background: var(--es-royal); color: #fff; border-radius: 4px; padding: 18px; }
.tu-step-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
             background: #fff; color: var(--es-royal); }
.tu-steps h3 { font-size: 17px; margin: 12px 0 6px; }
.tu-steps p { margin: 0; color: var(--es-on-royal); font-size: 15px; }

/* For parents: royal blue with the dotted map, the report on a phone */
.tu-parents { background: var(--es-royal) url('../images/home/bgpattern.svg') center / cover no-repeat; color: #fff; padding: 48px 0 0; overflow: hidden; }
.tu-parents .tu-h2-big { color: #fff; }
.tu-parents .tu-body { color: var(--es-on-royal); }
.tu-parents .tu-split > :last-child { padding-bottom: 8px; }
.tu-dots-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.tu-dots-list li { position: relative; padding-left: 24px; }
.tu-dots-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.tu-phone { position: relative; container-type: inline-size; max-width: 440px; width: 100%; margin: 0 auto; order: 2; }
.tu-phone img { display: block; width: 100%; height: auto; }
/* The example report drawn inside the phone screen (sizes follow the phone image, in cqw) */
.tu-phone-screen { position: absolute; left: 27.5%; top: 28.5%; width: 50%; color: var(--es-ink); font-size: 3cqw; line-height: 1.25; }
.tu-phone-head { display: grid; margin-bottom: 2.6cqw; }
.tu-phone-tag { color: var(--tu-gold); font-size: 2.4cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .3cqw; }
.tu-phone-title { font-size: 5.2cqw; font-weight: 800; letter-spacing: -.1cqw; }
.tu-phone-big { background: var(--es-royal); color: #fff; border-radius: 3cqw; padding: 2.6cqw 3cqw; }
.tu-phone-big b { display: block; font-size: 6.4cqw; line-height: 1.1; }
.tu-phone .tu-phone-big small { color: var(--es-on-royal); }
.tu-phone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw; margin: 1.8cqw 0 2.6cqw; }
.tu-phone-pair div { background: #EEF2F8; border-radius: 3cqw; padding: 2cqw 2.6cqw; }
.tu-phone-pair b { display: block; font-size: 5cqw; line-height: 1.1; color: var(--es-royal); }
.tu-phone small { display: block; color: var(--es-muted); font-size: 2.5cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-phone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5cqw; }
.tu-phone-list li { display: flex; align-items: center; gap: 1.8cqw; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-phone-list span { flex: none; width: 4.4cqw; height: 4.4cqw; border-radius: 50%; display: grid; place-items: center; font-size: 2.6cqw; font-weight: 800; color: #fff; }
.tu-phone-list .is-good span { background: var(--es-success); }
.tu-phone-list .is-warm span { background: var(--tu-warm); }
.tu-phone-list .is-next span { background: var(--tu-gold); }

/* For students */
.tu-student-visual { display: grid; gap: 10px; background: linear-gradient(160deg, var(--es-blue-soft), #F3F4FF); border-radius: 24px; padding: 20px; }
.tu-bubble { background: #fff; border-radius: 18px 18px 18px 4px; padding: 12px 14px; max-width: 90%; box-shadow: 0 4px 14px rgba(18, 22, 63, .06); }
.tu-bubble-me { justify-self: end; background: var(--es-royal); color: #fff; border-radius: 18px 18px 4px 18px; }
.tu-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tu-badges span { background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }

/* Curricula */
.tu-curricula-title { margin-top: 48px; }
.tu-curricula { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tu-curricula li { background: #E9ECF2; border-radius: 4px; padding: 12px 14px; }
.tu-curricula b { display: block; font-size: 17px; }
.tu-curricula small { font-size: 12px; font-weight: 600; color: var(--es-muted); }
.tu-curricula li.is-on small { color: var(--tu-gold); }
.tu-curricula .tu-curricula-more { background: none; display: flex; align-items: center; font-weight: 700; color: var(--es-ink); }

/* Pricing */
.tu-pricing { background: var(--es-royal); color: #fff; }
.tu-pricing .tu-h2-big { color: #fff; }
.tu-pricing .tu-body { color: var(--es-on-royal); }
.tu-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.tu-price { position: relative; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 6px; padding: 16px 14px; }
.tu-price h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--es-on-royal); }
.tu-price p { margin: 2px 0 0; color: #fff; font-size: 14px; }
.tu-price .tu-amount { font-size: 30px; font-weight: 800; color: #fff; margin: 6px 0 2px; line-height: 1.1; }
.tu-amount small { font-size: 14px; font-weight: 600; margin-left: 1px; }
.tu-price .tu-price-note { color: #7FD3F2; font-weight: 600; font-size: 13px; }
.tu-price-best { background: #fff; border-color: #fff; }
.tu-price-best h3, .tu-price-best p { color: var(--es-muted); }
.tu-price-best .tu-amount { color: var(--es-royal-deep); }
.tu-price-best .tu-ribbon { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
.tu-pricing-foot { display: grid; gap: 28px; align-items: center; }
.tu-card-img { width: 100%; max-width: 380px; height: auto; margin: 0 auto; display: block; }

/* Devices */
.tu-devices { text-align: center; padding-bottom: 0; }
.tu-devices .tu-body { margin-bottom: 14px; }
.tu-devices img { display: block; width: 100%; max-width: 980px; height: auto; margin: 16px auto 0; }

/* FAQ */
.tu-faq-block { padding-top: 32px; }
.tu-faq { border-bottom: 1px solid var(--es-line); padding: 16px 0; }
.tu-faq summary { font-weight: 700; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tu-faq summary::-webkit-details-marker { display: none; }
.tu-faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--tu-gold); }
.tu-faq[open] summary::after { content: '–'; }
.tu-faq p { color: var(--es-muted); margin: 10px 0 0; }

.tu-final { background: #E4E6EA; text-align: center; padding: 48px 0; }
.tu-final h2 { font-size: 24px; color: var(--es-ink); margin: 0 0 18px; }
.tu-home .es-home-footer { margin-top: 0; }

@media (min-width: 720px) {
  .tu-steps { grid-template-columns: 1fr 1fr; }
  .tu-prices { grid-template-columns: repeat(4, 1fr); }
  .tu-curricula { grid-template-columns: repeat(4, 1fr) auto; }
  .tu-h2-big { font-size: 36px; }
  .tu-final h2 { font-size: 30px; }
}
@media (min-width: 960px) {
  .tu-hero { display: block; min-height: 520px; }
  .tu-hero-photo { position: absolute; right: 0; top: 0; width: 54%; height: 100%; object-position: 50% 30%; }
  .tu-hero-grid { padding-top: 72px; padding-bottom: 72px; }
  .tu-hero-text { max-width: 470px; }
  .tu-hero h1 { font-size: 52px; }
  .tu-lead { font-size: 18px; }
  .tu-split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .tu-phone { order: 0; align-self: end; }
  .tu-parents { padding-top: 64px; }
  .tu-parents .tu-split { align-items: center; }
  .tu-steps { grid-template-columns: repeat(4, 1fr); }
  .tu-pricing-foot { grid-template-columns: 1fr 1fr; }
  .tu-section-block { padding: 80px 0; }
  .tu-devices { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .tu-flow-main, .tu-bar span, .tu-done-badge { animation: none; } }

/* Packages (pricing page, home page, plans page) */
.tu-packages { display: grid; gap: 16px; margin: 28px 0; }
.tu-package { position: relative; display: flex; flex-direction: column; gap: 10px; background: #fff; color: var(--es-ink);
              border: 1.5px solid var(--es-line); border-radius: 18px; padding: 20px 18px; }
.tu-package.is-mine { border-color: var(--tu-gold); box-shadow: 0 0 0 3px rgba(245, 165, 36, .25); }
.tu-package .tu-ribbon { left: 18px; right: auto; }
.tu-package-name { margin: 0; font-size: 22px; font-weight: 800; color: var(--es-royal-deep); }
.tu-package-grades { margin: -6px 0 4px; font-weight: 600; color: var(--es-muted); }
.tu-package-option { display: grid; gap: 2px; border-radius: 14px; padding: 12px 14px; background: var(--es-tint); }
.tu-package-option.is-best { background: #F3F4FF; border: 1.5px solid var(--es-royal); }
.tu-package-tag { justify-self: start; background: var(--tu-gold); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .4px;
                  text-transform: uppercase; padding: 3px 8px; border-radius: 999px; margin-bottom: 2px; }
.tu-package-label { font-size: 13px; font-weight: 700; color: var(--es-muted); text-transform: uppercase; letter-spacing: .5px; }
.tu-package-price { font-size: 30px; font-weight: 800; color: var(--es-royal-deep); line-height: 1.15; }
.tu-package-price.is-small { font-size: 22px; }
.tu-package-price small { font-size: 14px; font-weight: 600; color: var(--es-muted); margin-left: 2px; }
.tu-package-saving { font-size: 13px; font-weight: 600; color: var(--es-success); }
.tu-package-subjects { margin: auto 0 0; padding-top: 4px; font-size: 14px; font-weight: 600; color: var(--es-ink); }
.tu-packages.is-dark .tu-package { border-color: #fff; }
.tu-included { display: grid; gap: 8px 20px; padding: 0; margin: 0; list-style: none; }
.tu-included li { position: relative; padding-left: 26px; font-weight: 600; }
.tu-included li::before { content: '✓'; position: absolute; left: 0; color: var(--es-success); font-weight: 800; }
.tu-pricing .tu-included li::before { color: #7FD3F2; }
@media (min-width: 560px) { .tu-included { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .tu-packages { grid-template-columns: repeat(3, 1fr); } .tu-included { grid-template-columns: repeat(3, 1fr); } }

/* Billing choice (plans page, pay-for page) */
.tu-billing { display: grid; gap: 10px; margin-top: 12px; }
.tu-billing-option { position: relative; display: grid; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 16px; cursor: pointer;
                     font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--es-line); }
.tu-billing-option:hover { border-color: var(--es-blue); }
.tu-billing-option.is-on { border-color: var(--es-royal); box-shadow: 0 0 0 3px rgba(0, 0, 150, .1); background: #F3F4FF; }
.tu-billing-option .tu-ribbon { top: -10px; }
.tu-billing-option s { color: var(--es-muted); font-weight: 600; font-size: 15px; margin-left: 6px; }
@media (min-width: 640px) { .tu-billing { grid-template-columns: 1fr 1fr; } }
.tu-quote { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.tu-quote td { padding: 8px 0; border-top: 1px solid var(--es-line); vertical-align: top; }
.tu-quote td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.tu-quote small { display: block; color: var(--es-muted); font-weight: 500; }
.tu-quote .tu-quote-discount { color: var(--es-success); font-weight: 600; }
.tu-quote tfoot td { font-size: 17px; font-weight: 800; }
.tu-limit-note { background: var(--tu-gold-soft); border-radius: 14px; padding: 14px 16px; }
.tu-limit-note p { margin: 0 0 10px; }
