:root {
  /* Brand — shared */
  --font-app: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --page-bg: #f6f8fb;
  --card-bg: #ffffff;
  --card-border: #e9ecef;
  --shadow-soft: 0 10px 30px rgba(38, 33, 92, 0.08);

  /* Kids (learner) accent — friendly violet */
  --kid: #7f77dd;
  --kid-strong: #534ab7;
  --kid-deep: #26215c;
  --kid-tint: #eeedfe;

  /* Parent accent — calm blue */
  --parent: #378add;
  --parent-strong: #185fa5;
  --parent-deep: #042c53;
  --parent-tint: #e6f1fb;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

html, body {
    min-height: 100%;
}

body {
    background: var(--page-bg);
    font-family: var(--font-app);
}

/* ===================================================================
   Themeable auth (kids + parents share these; theme class picks accent)
   =================================================================== */

.theme-kid {
    --accent: var(--kid);
    --accent-strong: var(--kid-strong);
    --accent-deep: var(--kid-deep);
    --accent-tint: var(--kid-tint);
    --accent-grad: linear-gradient(160deg, #7f77dd 0%, #534ab7 60%, #3c3489 100%);
    --accent-shadow: rgba(127, 119, 221, 0.35);
    --accent-ring: rgba(127, 119, 221, 0.16);
}

.theme-parent {
    --accent: var(--parent);
    --accent-strong: var(--parent-strong);
    --accent-deep: var(--parent-deep);
    --accent-tint: var(--parent-tint);
    --accent-grad: linear-gradient(160deg, #378add 0%, #185fa5 60%, #0c447c 100%);
    --accent-shadow: rgba(55, 138, 221, 0.35);
    --accent-ring: rgba(55, 138, 221, 0.16);
}

/* Split shell */
.auth-split {
    width: 100%;
    max-width: 940px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    animation: auth-rise 0.5s ease both;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Left promo panel */
.auth-promo {
    flex: 1 1 46%;
    position: relative;
    overflow: hidden;
    background: var(--accent-grad);
    color: #fff;
    padding: 2.75rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
.auth-blob-1 { width: 190px; height: 190px; top: -70px; right: -45px; }
.auth-blob-2 { width: 130px; height: 130px; bottom: -40px; left: -35px; background: rgba(255, 255, 255, 0.08); }

.auth-mascot {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    animation: auth-float 3.6s ease-in-out infinite;
}
.auth-mascot svg { display: block; }

@keyframes auth-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}

.auth-icon-tile {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-promo-headline { position: relative; z-index: 1; }
.auth-promo-headline h2 {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}
.auth-rotator {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    min-height: 1.5rem;
    transition: opacity 0.4s ease;
}

.auth-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 600;
    font-size: 1rem;
}
.auth-feature-ico {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gamification teaser */
.auth-streak {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    align-self: flex-start;
}
.auth-streak-ico {
    width: 34px;
    height: 34px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-streak strong { display: block; font-size: 1rem; font-weight: 800; }
.auth-streak span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); font-weight: 600; }

/* Right form panel */
.auth-form-panel {
    flex: 1 1 54%;
    padding: 2.75rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-form-head { margin-bottom: 1.5rem; }
.auth-form-head h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-deep);
    margin: 0;
}
.auth-form-head p {
    color: #6b7280;
    font-weight: 600;
    margin: 0.25rem 0 0;
}

.auth-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.4rem;
}

.auth-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 54px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0 0.9rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}
.auth-field > svg {
    color: var(--accent);
    flex: none;
}

.auth-input {
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    width: 100%;
    padding: 0;
    color: #111827;
}
.auth-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: normal;
}

.auth-eye {
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    margin-left: auto;
}
.auth-eye:hover { color: var(--accent-strong); }

.btn-auth {
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: transform 0.08s ease, background 0.15s ease;
    box-shadow: 0 8px 18px var(--accent-shadow);
}
.btn-auth:hover { background: var(--accent-strong); color: #fff; }
.btn-auth:active { transform: scale(0.98); }

.auth-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: center;
    font-weight: 600;
}
.auth-alt {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: #6b7280;
}
.auth-alt a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

.auth-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-weight: 600;
}
.auth-check a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }
.auth-check a:hover { text-decoration: underline; }

.auth-links {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef0f4;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: #6b7280;
    text-align: center;
}
.auth-links a { color: var(--accent-strong); font-weight: 700; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* Passwordless quick sign-in (trusted device) — Netflix-style "who's learning?" picker */
.quick-label { font-weight: 800; color: var(--kid-deep); font-size: 1.05rem; margin: 0 0 0.75rem; }
.quick-signin-list { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1rem; }
.quick-signin { margin: 0; }
.quick-tile { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0; border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.quick-tile.selected .quick-avatar { outline-color: var(--accent, #7f77dd); }
.quick-tile.selected .quick-name { color: var(--kid-deep); }
.quick-avatar { width: 88px; height: 88px; border-radius: 16px; display: grid; place-items: center; font-size: 2.8rem; color: #fff; outline: 3px solid transparent; outline-offset: 2px; transition: transform 0.12s ease, outline-color 0.12s ease, box-shadow 0.12s ease; box-shadow: 0 6px 16px rgba(30, 27, 75, 0.18); }
.quick-tile:hover .quick-avatar,
.quick-tile:focus-visible .quick-avatar { transform: scale(1.06); outline-color: var(--accent, #7f77dd); }
.quick-tile:active .quick-avatar { transform: scale(0.98); }
.quick-name { font-weight: 700; font-size: 0.9rem; color: #6b7280; max-width: 96px; transition: color 0.12s ease; }
.quick-tile:hover .quick-name,
.quick-tile:focus-visible .quick-name { color: var(--kid-deep); }
.auth-or { display: flex; align-items: center; gap: 0.75rem; color: #9aa4b2; font-size: 0.85rem; font-weight: 600; margin: 0.25rem 0 1rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #eef0f4; }

/* Stack on small screens */
@media (max-width: 820px) {
    .auth-split { flex-direction: column; max-width: 440px; }
    .auth-promo { padding: 2rem 1.75rem; gap: 1.2rem; }
    .auth-promo-headline h2 { font-size: 1.6rem; }
    .auth-features, .auth-streak { display: none; }
    .auth-mascot svg { width: 84px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-split, .auth-mascot { animation: none; }
    .auth-rotator { transition: none; }
}

/* ===== Legacy centered card (Register, Forgot/Reset password, etc.) ===== */
.auth-page {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 2rem;
}

    .auth-card h1 {
        font-weight: 700;
    }

.form-control-lg {
    border-radius: 0.75rem;
}

.btn-lg {
    border-radius: 0.75rem;
}

.navbar-brand {
    font-weight: 700;
}

.parent-shell {
    display: flex;
    min-height: calc(100vh - 120px);
}

.parent-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 1.25rem;
    transition: margin-left 0.25s ease;
}

    .parent-sidebar.hidden {
        margin-left: -260px;
    }

.sidebar-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.35rem;
    border-radius: 0.75rem;
    color: #374151;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: #9ca3af;
    transition: color 0.15s ease;
}
.sidebar-link:hover {
    background: var(--accent-tint, #f3f4f6);
    color: var(--accent-strong, #111827);
}
.sidebar-link:hover svg { color: var(--accent-strong, #6b7280); }
.sidebar-link.active {
    background: var(--accent, #4b5563);
    color: #fff;
}
.sidebar-link.active svg { color: #fff; }

.parent-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

/* ===== App shell (nav) ===== */
.app-navbar {
    background: #fff;
    border-bottom: 1px solid #eef0f4;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--kid-deep);
    text-decoration: none;
}
.app-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(160deg, #7f77dd, #534ab7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: none;
}
.app-brand-logo {
    height: 34px;
    width: auto;
    display: block;
}
.app-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 42px;
    padding: 0 1.1rem;
    border-radius: 12px;
    background: #234E70;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    border: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}
.app-home-btn:hover {
    background: #1b3d59;
    color: #fff;
    transform: translateY(-1px);
}
.app-home-btn svg { flex: none; }

/* Parent devices & security page */
.device-settings { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid #eef0f4; border-radius: 14px; margin-bottom: 1.25rem; }
.device-muted { color: #8a94a6; font-size: 0.85rem; }
.btn-toggle { border: 0; border-radius: 999px; padding: 0.4rem 1.1rem; font-weight: 800; cursor: pointer; color: #fff; }
.btn-toggle.on { background: #16a34a; }
.btn-toggle.off { background: #9aa4b2; }
.device-section-label { font-weight: 800; color: #234E70; font-size: 1.02rem; margin: 1.5rem 0 0.65rem; }
.btn-signout-others { border: 1.5px solid #eecccc; background: #fff; color: #b91c1c; border-radius: 11px; padding: 9px 16px; font-weight: 800; font-size: .85rem; cursor: pointer; transition: background .12s ease; }
.btn-signout-others:hover { background: #fef2f2; }

/* Parent per-child overview */
.po-wrap { max-width: 1180px; margin: 0 auto; }
.po-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1.2rem; }
.po-head-id { display: flex; align-items: center; gap: 12px; }
.po-avatar { width: 44px; height: 44px; border-radius: 50%; background: #eef2fb; color: #6a7fb0; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.po-kicker { font-size: .78rem; color: #8a94a6; font-weight: 700; }
.po-title { font-size: 1.35rem; font-weight: 900; color: #234E70; line-height: 1.1; }
.po-sub { font-size: .85rem; color: #7a8698; font-weight: 600; }
.po-pickers { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.po-picker { display: flex; flex-direction: column; gap: 4px; }
.po-picker label { font-size: .75rem; color: #8a94a6; font-weight: 700; }
.po-picker select { border: 1.5px solid #e4ecf2; border-radius: 10px; padding: 8px 12px; font-weight: 700; color: #234E70; background: #fff; min-width: 150px; }

.po-summary { display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(135deg, #f3f1ff 0%, #eaf1ff 100%); border: 1px solid #e6e6fb; border-radius: 16px; padding: 16px 18px; margin-bottom: 1.4rem; }
.po-summary-emoji { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
.po-summary-body { flex: 1; }
.po-summary-text { font-size: 1.05rem; font-weight: 700; color: #234E70; line-height: 1.5; }
.po-summary-win { margin-top: 6px; font-size: .9rem; font-weight: 800; color: #166534; }
.po-summary-meta { margin-top: 6px; font-size: .82rem; font-weight: 700; color: #8a94a6; }

.po-arrow { font-weight: 900; }
.arrow-up { color: #16a34a; }
.arrow-down { color: #dc2626; }
.arrow-flat { color: #8a94a6; }

.po-details > summary { list-style: none; cursor: pointer; font-size: 1.15rem; font-weight: 800; color: #234E70; display: flex; align-items: baseline; gap: 8px; }
.po-details > summary::-webkit-details-marker { display: none; }
.po-details > summary::before { content: "▸"; color: #8a94a6; font-size: .9rem; transition: transform .15s ease; }
.po-details[open] > summary::before { transform: rotate(90deg); }
.po-details > summary .po-muted { font-size: .82rem; font-weight: 600; }

.po-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 1.4rem; }
.po-card { background: #f6f8fc; border: 1px solid #eaeef6; border-radius: 16px; padding: 16px 18px; }
.po-card-label { font-size: .85rem; color: #7a8698; font-weight: 700; margin-bottom: 6px; }
.po-card-num { font-size: 1.6rem; font-weight: 900; color: #234E70; display: flex; align-items: center; gap: 8px; }
.po-card-foot { font-size: .8rem; color: #8a94a6; font-weight: 600; margin-top: 4px; }
.po-up { color: #16a34a; }

.po-band { font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.po-band.band-great { background: #dcfce7; color: #166534; }
.po-band.band-good { background: #fef2cf; color: #92610a; }
.po-band.band-weak { background: #fee2e2; color: #b91c1c; }
.po-band.band-none { background: #eef0f4; color: #6b7280; }

.po-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.po-col { display: flex; flex-direction: column; gap: 1.6rem; }
.po-block-head { display: flex; align-items: center; gap: 10px; }
.po-block h2 { font-size: 1.15rem; font-weight: 800; color: #234E70; margin: 0; }
.po-muted { color: #8a94a6; font-size: .86rem; font-weight: 600; margin: .2rem 0 .7rem; }
.po-pill { font-size: .72rem; font-weight: 800; color: #2f6fdb; background: #e9f2ff; padding: 3px 10px; border-radius: 999px; }

.po-attention { border-left: 4px solid #f59e0b; padding: .2rem 0 .2rem 16px; }
.po-attention.band-weak { border-left-color: #dc2626; }
.po-attention.band-good { border-left-color: #f59e0b; }
.po-attention.band-great { border-left-color: #16a34a; }
.po-att-crumb { font-size: .8rem; color: #8a94a6; font-weight: 700; }
.po-att-title { font-size: 1.15rem; font-weight: 800; color: #234E70; margin: 3px 0 6px; }
.po-att-reason { font-size: .9rem; color: #5a6474; font-weight: 500; line-height: 1.55; margin: 0 0 10px; }
.po-att-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.po-att-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-att-primary { background: #1f2733; color: #fff; border-radius: 11px; padding: 9px 16px; font-weight: 800; font-size: .85rem; text-decoration: none; border: 0; }
.btn-att-primary:hover { background: #111827; }
.btn-att-soft { background: #fff; border: 1.5px solid #e0e5ee; border-radius: 11px; padding: 9px 16px; font-weight: 800; font-size: .85rem; color: #374151; cursor: pointer; }

.po-mistakes { margin-top: 12px; border-top: 1px solid #eef0f4; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.po-mistake-q { font-size: .86rem; color: #34435a; font-weight: 600; }
.po-mistake-a { font-size: .82rem; font-weight: 700; margin-top: 2px; }
.po-x { color: #b91c1c; margin-right: 10px; }
.po-ok { color: #166534; }

.po-trend { display: block; max-width: 460px; }

.po-strand { margin-bottom: 18px; }
.po-idle-name { color: #a6b0bd; font-weight: 700; }

.cap-banner { text-align: center; background: #fff7e6; border: 1px solid #f5deb0; border-radius: 16px; padding: 1.6rem 1.4rem; margin-bottom: 1rem; }
.cap-banner-ico { font-size: 2rem; }
.cap-banner strong { display: block; color: #234E70; font-size: 1.05rem; margin-top: .4rem; }
.cap-banner p { color: #7a6a4a; font-weight: 600; margin: .4rem 0 0; line-height: 1.5; }
.po-strand-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.po-strand-name { font-weight: 800; color: #234E70; font-size: .95rem; }
.po-strand-val { font-weight: 800; font-size: .9rem; color: #374151; }
.po-strand-bar { height: 9px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.po-strand-fill { height: 100%; border-radius: 999px; }
.po-strand-fill.band-great { background: #16a34a; }
.po-strand-fill.band-good { background: #f59e0b; }
.po-strand-fill.band-weak { background: #dc2626; }

.po-subs { margin: 9px 0 2px; padding-left: 14px; border-left: 2px solid #eef0f4; display: flex; flex-direction: column; gap: 9px; }
.po-sub-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.po-sub-name { font-size: .82rem; font-weight: 700; color: #5a6474; }
.po-sub-val { font-size: .8rem; font-weight: 800; color: #374151; }
.po-sub-bar { height: 6px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.po-sub-fill { height: 100%; border-radius: 999px; }
.po-sub-fill.band-great { background: #16a34a; }
.po-sub-fill.band-good { background: #f59e0b; }
.po-sub-fill.band-weak { background: #dc2626; }

.po-help { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.po-help-ico { font-size: 1.15rem; flex: 0 0 auto; }
.po-help b { display: block; color: #234E70; font-size: .92rem; }
.po-help span { color: #5a6474; font-size: .86rem; font-weight: 500; line-height: 1.5; }

.po-empty { text-align: center; background: #f6f8fc; border: 1px solid #eaeef6; border-radius: 18px; padding: 2.4rem 1.5rem; }
.po-empty-emoji { font-size: 2.4rem; }
.po-empty-title { font-weight: 900; font-size: 1.2rem; color: #234E70; margin-top: .4rem; }
.po-empty-sub { color: #7a8698; font-weight: 600; margin-top: .3rem; max-width: 420px; margin-left: auto; margin-right: auto; }

@media (max-width: 760px) { .po-cards { grid-template-columns: 1fr; } .po-grid { grid-template-columns: 1fr; } }
.device-group { border: 1px solid #eef0f4; border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.device-group.highlight { border-color: #27C5D9; box-shadow: 0 0 0 3px rgba(39,197,217,0.15); }
.device-group-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.device-group-head strong { font-size: 1.05rem; }
.device-group-head .device-muted { margin-left: auto; }
.device-warn { background: #fff8e2; border: 1px solid #ffe28a; color: #7a5b00; border-radius: 12px; padding: 0.7rem 0.85rem; font-size: 0.88rem; margin-bottom: 0.7rem; line-height: 1.4; }
.device-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.75rem; background: #f7f8fa; border-radius: 12px; }
.device-info { display: flex; flex-direction: column; gap: 0.15rem; }
.device-name { font-weight: 700; }
.device-badge { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.device-badge.pending { background: #fde68a; color: #7a5b00; }
.device-badge.ok { background: #dcfce7; color: #166534; }
.device-actions { display: flex; gap: 0.4rem; flex: none; }
.btn-mini { border: 0; border-radius: 10px; padding: 0.35rem 0.8rem; font-weight: 800; font-size: 0.82rem; cursor: pointer; }
.btn-mini.approve { background: #16a34a; color: #fff; }
.btn-mini.remove { background: #fee2e2; color: #b91c1c; }

/* Parent "set quizzes" (assignments) page */
.assign-suggest { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #eafafc; border: 1px solid #b8ecf2; border-radius: 14px; padding: 0.9rem 1.1rem; margin-bottom: 1.1rem; }
.assign-form { display: flex; flex-direction: column; gap: 0.25rem; }
.assign-row { display: flex; gap: 0.75rem; }
.assign-row .setup-field { flex: 1; }
.assign-schedule { display: flex; gap: 1.2rem; margin: 0.3rem 0; }
.assign-radio { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; cursor: pointer; }
.assign-sub { margin-top: 0.4rem; }
.assign-days { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.assign-day { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid #e4ecf2; border-radius: 10px; padding: 0.3rem 0.6rem; font-size: 0.85rem; font-weight: 700; cursor: pointer; }

/* Assignment options: questions / timing / when */
.opt-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.opt-chip { position: relative; cursor: pointer; }
.opt-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-chip > span { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 52px; padding: 0.55rem 0.95rem; border: 1.5px solid #e4ecf2; border-radius: 12px; font-weight: 800; color: #374151; background: #fff; transition: all 0.12s ease; }
.opt-chip:hover > span { border-color: var(--accent); }
.opt-chip input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-ring); }
.opt-chip-wide > span { min-width: auto; }

.opt-inline { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.opt-minutes { display: inline-flex; align-items: center; gap: 0.45rem; }
.opt-num { width: 68px; height: 42px; border: 1.5px solid #e4ecf2; border-radius: 11px; padding: 0 0.65rem; font-weight: 800; text-align: center; color: #374151; }
.opt-num:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.opt-suffix { color: #8a94a6; font-weight: 800; font-size: 0.85rem; }

.opt-seg { display: inline-flex; border: 1.5px solid #e4ecf2; border-radius: 12px; overflow: hidden; margin-bottom: 0.2rem; }
.opt-seg-btn { position: relative; cursor: pointer; }
.opt-seg-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-seg-btn > span { display: inline-block; padding: 0.55rem 1.2rem; font-weight: 800; color: #6b7280; background: #fff; transition: all 0.12s ease; }
.opt-seg-btn + .opt-seg-btn > span { border-left: 1.5px solid #e4ecf2; }
.opt-seg-btn input:checked + span { background: var(--accent); color: #fff; }

.opt-sub { margin-top: 0.6rem; }
.opt-hint { font-size: 0.8rem; font-weight: 700; color: #8a94a6; margin-bottom: 0.35rem; }
.opt-date { height: 44px; border: 1.5px solid #e4ecf2; border-radius: 12px; padding: 0 0.85rem; font-weight: 700; color: #374151; }
.opt-date:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.opt-days { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.opt-day { position: relative; cursor: pointer; }
.opt-day input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-day > span { display: inline-block; min-width: 44px; text-align: center; padding: 0.4rem 0.65rem; border: 1.5px solid #e4ecf2; border-radius: 10px; font-weight: 800; font-size: 0.84rem; color: #374151; background: #fff; transition: all 0.12s ease; }
.opt-day input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }

/* Learner dashboard: strand tiles -> sub-strand cards -> topic cards */
/* Cheerful rotating palette (applied to strand tiles + sub-strand cards) */
.ld-c0 { --c: #7f77dd; --cbg: #f1f0fe; --cbd: #ddd9fb; }
.ld-c1 { --c: #0fb5a4; --cbg: #e2faf6; --cbd: #bff0e8; }
.ld-c2 { --c: #f59e0b; --cbg: #fff4dd; --cbd: #fbe4b8; }
.ld-c3 { --c: #ec4899; --cbg: #fdeaf3; --cbd: #f8cfe2; }
.ld-c4 { --c: #3b82f6; --cbg: #e9f2ff; --cbd: #cbdefb; }

.ld-subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 1.75rem; }
.ld-subj { display: flex; flex-direction: column; justify-content: center; min-height: 150px; background: #fff; border: 2px solid var(--cbd, #e9edf3); border-radius: 24px; padding: 22px 24px; text-decoration: none; color: #234E70; box-shadow: 0 6px 16px rgba(35,78,112,.06); transition: transform .12s ease, box-shadow .12s ease; }
.ld-subj:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(35,78,112,.14); }
.ld-subj.is-selected { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #7f77dd) 22%, transparent); }
.ld-subj-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ld-subj-ico { width: 50px; height: 50px; border-radius: 15px; background: var(--cbg, #f1f0fe); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.ld-subj-name { font-weight: 800; font-size: 1.2rem; }
.ld-meter { height: 10px; background: #edf0f4; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.ld-meter-fill { height: 100%; background: var(--c, var(--accent)); border-radius: 999px; }
.ld-subj-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ld-comp { font-size: .82rem; color: #7a8698; font-weight: 700; }
.ld-badge { font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.band-great { background: #dcfce7; color: #166534; }
.band-good { background: #fff3d6; color: #9a6700; }
.band-weak { background: #fee2e2; color: #b91c1c; }
.band-none { background: #eef0f4; color: #6b7280; }

.ld-detail { margin-top: .5rem; }
.ld-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ld-crumb { font-size: 1.05rem; color: #7a8698; font-weight: 700; }
.ld-crumb b { color: #234E70; font-weight: 900; font-size: 1.15rem; }
.ld-crumb-sep { margin: 0 4px; color: #b6c0cd; }

.ld-block { border-top: 1px solid #eef0f4; padding: 14px 0; }
.ld-block:first-of-type { border-top: 0; }
.ld-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ld-block-name { font-weight: 800; font-size: 1rem; }
.ld-block-metrics { display: flex; align-items: center; gap: 10px; }

.ld-row { padding: 9px 0; border-top: 1px solid #f2f4f8; }
.ld-row:first-child { border-top: 0; }
.ld-row-name { font-size: .95rem; font-weight: 700; color: #34435a; line-height: 1.35; margin-bottom: 6px; max-width: 720px; }
.ld-row-name.is-locked { color: #a6b0bd; font-weight: 600; }
.ld-row-bottom { display: flex; align-items: center; gap: 18px; }
.ld-bar { position: relative; height: 22px; flex: 0 1 460px; background: #eef0f4; border-radius: 11px; overflow: hidden; }
.ld-bar-practice { position: absolute; left: 0; top: 0; height: 100%; background: #c6cdd8; }
.ld-bar-success { position: absolute; left: 0; top: 7px; height: 8px; border-radius: 4px; }
.ld-bar-success.band-great { background: #16a34a; }
.ld-bar-success.band-good { background: #f59e0b; }
.ld-bar-success.band-weak { background: #dc2626; }
.ld-bar-tick { position: absolute; left: 75%; top: 0; height: 100%; width: 2px; background: #334155; }
.ld-row-meta { flex: 0 0 auto; font-size: .85rem; color: #7a8698; font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ld-row-meta b { color: #234E70; }
.ld-locked { color: #a6b0bd; }
.ld-check { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #16a34a; color: #fff; font-size: .7rem; font-weight: 900; }

.ld-legend { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef0f4; font-size: .78rem; color: #7a8698; font-weight: 700; }
.ld-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lk-swatch { display: inline-block; border-radius: 5px; }
.lk-practice { width: 22px; height: 10px; background: #c6cdd8; }
.lk-success { width: 22px; height: 6px; background: #f59e0b; }
.lk-tick { display: inline-block; width: 2px; height: 14px; background: #334155; }
.lk-bands .band-weak { background: none; color: #dc2626; padding: 0; }
.lk-bands .band-good { background: none; color: #b45309; padding: 0; }
.lk-bands .band-great { background: none; color: #166534; padding: 0; }

.ld-empty { text-align: center; background: #fff; border: 1.5px solid #e9edf3; border-radius: 18px; padding: 2.5rem 1.5rem; }
.ld-empty-emoji { font-size: 2.6rem; }
.ld-empty-title { font-weight: 900; font-size: 1.3rem; color: #234E70; margin-top: .5rem; }
.ld-empty-sub { color: #7a8698; font-weight: 600; margin-top: .3rem; }

/* Subject headline (rich hero) + strand section + sub-strand accordion */
.ld-hero2 { display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; background: linear-gradient(135deg, #f3f1ff 0%, #eaf1ff 100%); border: 2px solid #e6e6fb; border-radius: 26px; padding: 22px 32px; margin-bottom: 1.5rem; box-shadow: 0 8px 22px rgba(35,78,112,.06); }
.ld-hero2-lead { display: flex; align-items: center; gap: 16px; }
.ld-hero2-illus { width: 76px; height: 76px; border-radius: 20px; background: linear-gradient(160deg, #8b82e6, #6157c4); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; box-shadow: 0 8px 18px rgba(127,119,221,.35); flex: 0 0 auto; }
.ld-hero2-id { min-width: 150px; }
.ld-hero2-name { font-weight: 900; font-size: 1.7rem; color: #234E70; line-height: 1.1; }
.ld-hero2-sub { font-size: .9rem; color: #7a8698; font-weight: 700; margin-top: 5px; }

.ld-hero2-sec { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-left: 22px; border-left: 1.5px solid #e3e3f4; }
.ld-hero2-ring svg { width: 108px; height: 108px; filter: drop-shadow(0 5px 6px rgba(35,78,112,.16)); }
.ld-hero2-caption { font-size: .95rem; color: #7a8698; font-weight: 800; }

.ld-shield { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; }
.ld-shield.band-great { background: #16a34a; }
.ld-shield.band-good { background: #eab308; }
.ld-shield.band-weak { background: #dc2626; }
.ld-shield.band-none { background: #9aa4b2; }
.ld-shield-txt { font-weight: 800; font-size: .95rem; }
.ld-shield-txt.band-great { color: #166534; }
.ld-shield-txt.band-good { color: #92610a; }
.ld-shield-txt.band-weak { color: #b91c1c; }
.ld-shield-txt.band-none { color: #6b7280; }

.ld-hero2-stats { flex-direction: row; gap: 18px; }
.hstat { background: #fff; border-radius: 16px; padding: 12px 16px; min-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 9px rgba(35,78,112,.07); }
.hstat-ico { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-bottom: 2px; }
.hi-blue { background: #e3effe; }
.hi-green { background: #e0f6e7; }
.hi-amber { background: #fde9d5; }
.hi-purple { background: #efeafe; }
.hstat b { font-size: 1.35rem; color: #234E70; line-height: 1; }
.hstat-lbl { font-size: .68rem; color: #7a8698; font-weight: 700; line-height: 1.15; text-align: center; }

.ld-hero2-cta { border-left: 0; padding-left: 0; }
.btn-continue { display: inline-block; background: linear-gradient(160deg, #8b82e6, #6157c4); color: #fff; border-radius: 16px; padding: 13px 24px; font-weight: 800; font-size: 1rem; text-decoration: none; box-shadow: 0 6px 16px rgba(127,119,221,.4); text-align: center; transition: transform .12s ease, filter .12s ease; }
.btn-continue:hover { transform: translateY(-1px); filter: brightness(1.05); }
.ld-hero2-next { font-size: .8rem; color: #7a8698; font-weight: 700; margin-top: 8px; text-align: center; }

/* Quiz-quality pie charts + shared key */
.ld-pie { gap: 7px; }
.ld-pie-cap { font-size: .74rem; color: #7a8698; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.ld-pie-svg { display: block; width: 108px; height: 108px; filter: drop-shadow(0 6px 7px rgba(35,78,112,.28)) drop-shadow(0 1px 0 rgba(255,255,255,.7)); }
.ld-pie-legend { display: flex; gap: 12px; font-size: .9rem; font-weight: 800; }
.ld-pie-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ld-pie-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pl-well { color: #166534; } .pl-well::before { background: #16a34a; }
.pl-fair { color: #92610a; } .pl-fair::before { background: #eab308; }
.pl-low { color: #b91c1c; } .pl-low::before { background: #dc2626; }

.ld-hero2-key { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 4px; padding-top: 12px; border-top: 1px solid #e3e3f4; font-size: .76rem; color: #7a8698; font-weight: 700; }
.ld-hero2-key span { display: inline-flex; align-items: center; gap: 6px; }
.ld-hero2-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.k-well { background: #16a34a; } .k-fair { background: #eab308; } .k-low { background: #dc2626; }

/* Parent passwordless quick sign-in tile + trust option */
.quick-parent-btn { width: 100%; display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--accent); border-radius: 16px; padding: 14px 16px; cursor: pointer; text-align: left; color: #234E70; transition: background .12s ease, transform .12s ease; }
.quick-parent-btn:hover { background: var(--accent-tint); transform: translateY(-1px); }
.quick-parent-ava { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex: 0 0 auto; }
.quick-parent-txt { display: flex; flex-direction: column; flex: 1; }
.quick-parent-txt b { font-weight: 800; font-size: 1rem; }
.quick-parent-txt small { color: #7a8698; font-size: .8rem; font-weight: 600; }
.auth-or { text-align: center; color: #9aa4b2; font-size: .82rem; font-weight: 700; margin: 16px 0; position: relative; }
.auth-or::before, .auth-or::after { content: ""; position: absolute; top: 50%; width: 32%; height: 1px; background: #e9edf3; }
.auth-or::before { left: 0; } .auth-or::after { right: 0; }
.auth-trust { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 16px; font-size: .85rem; color: #4a5568; font-weight: 600; cursor: pointer; }
.auth-trust small { color: #8a94a6; font-weight: 500; }

@media (max-width: 720px) {
    .ld-hero2-sec { border-left: 0; padding-left: 0; }
    .ld-hero2-cta { margin-left: 0; }
}

.ld-section-label { font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #9aa4b2; margin: 0 0 .7rem 4px; }

/* Strand hero banner */
.ld-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #fef5ff 0%, #eef3ff 100%); border: 2px solid #ece5fb; border-radius: 24px; padding: 20px 24px; margin-bottom: 18px; flex-wrap: wrap; box-shadow: 0 6px 16px rgba(35,78,112,.05); }
.ld-hero-ico { width: 60px; height: 60px; border-radius: 18px; background: #fff; box-shadow: 0 3px 8px rgba(127,119,221,.18); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; flex: 0 0 auto; }
.ld-hero-name { font-weight: 900; font-size: 1.55rem; color: #234E70; }
.ld-hero-metrics { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Strand card: coloured header band + white body holding the sub-strand cards */
.ld-strand { background: #fff; border: 2px solid var(--cbd, #e6e6fb); border-radius: 24px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(35,78,112,.06); }
.ld-strand-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--cbg, #f3f1ff); border-bottom: 2px solid var(--cbd, #e6e6fb); padding: 18px 22px; }
.ld-strand-head .ld-hero-ico { box-shadow: 0 3px 8px color-mix(in srgb, var(--c, #7f77dd) 25%, transparent); }
.ld-strand-body { background: #fff; padding: 16px; }
.ld-strand-body .ld-ss:last-child { margin-bottom: 0; }

/* Sub-strand card: coloured header band + white body of topic tiles */
.ld-ss { background: #fff; border: 2px solid var(--cbd, #e8edf8); border-radius: 22px; margin-bottom: 16px; overflow: hidden; }
.ld-ss-head { width: 100%; display: flex; align-items: center; gap: 14px; background: var(--cbg, #f5f7fd); border: 0; padding: 15px 20px; cursor: pointer; text-align: left; font: inherit; }
.ld-ss.is-open .ld-ss-head { border-bottom: 2px solid var(--cbd, #e8edf8); }
.ld-ss-head:hover .ld-ss-name { color: var(--c, var(--accent-deep)); }
.ld-ss-ico { width: 44px; height: 44px; border-radius: 14px; background: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--c, #234E70) 22%, transparent); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex: 0 0 auto; }
.ld-ss-name { font-weight: 800; font-size: 1.18rem; color: #234E70; }
.ld-ss-metrics { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ld-ss-caret { color: var(--c, #8a94a6); transition: transform .15s ease; font-size: 1.15rem; font-weight: 900; flex: 0 0 auto; }
.ld-ss.is-open .ld-ss-caret { transform: rotate(180deg); }
.ld-ss-body { display: none; background: #fff; padding: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ld-ss.is-open .ld-ss-body { display: grid; }

/* Blue completion bar */
.ld-comp2 { color: #2f6fdb; font-weight: 800; font-size: .82rem; white-space: nowrap; }
.ld-tbar { height: 9px; width: 150px; background: #e4e9f1; border-radius: 999px; overflow: hidden; }
.ld-tbar-lg { width: 200px; }
.ld-tbar-fill { height: 100%; background: linear-gradient(90deg, #4b93ff, #2f6fdb); border-radius: 999px; }

/* Success star badge */
.ld-star { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .84rem; padding: 5px 13px; border-radius: 999px; white-space: nowrap; }
.ld-star .st { font-size: .95rem; line-height: 1; }
.ld-star.band-great { background: #dcfce7; color: #166534; }
.ld-star.band-great .st { color: #16a34a; }
.ld-star.band-good { background: #fef2cf; color: #92610a; }
.ld-star.band-good .st { color: #eab308; }
.ld-star.band-weak { background: #fee2e2; color: #b91c1c; }
.ld-star.band-weak .st { color: #dc2626; }
.ld-star.band-none { background: #eef0f4; color: #6b7280; }

/* Mastery medal — depth across difficulty levels (separate from the accuracy star) */
.ld-medal { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .8rem; padding: 5px 12px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.ld-medal-bronze { background: #f7ede3; color: #8a5a2b; border-color: #e6cfb6; }
.ld-medal-silver { background: #eef1f5; color: #566072; border-color: #d3dae3; }
.ld-medal-gold { background: #fdf4d0; color: #8a6d0a; border-color: #efd98a; }

/* Topic tile (sits in the white body) */
.ld-tcard { display: flex; flex-direction: column; background: #f3f5f8; border: 1px solid #e8ebf1; border-radius: 16px; padding: 16px 17px; }
.ld-tcard.is-locked { background: #eef0f4; }
.ld-tcard-title { font-weight: 700; font-size: .92rem; line-height: 1.4; color: #2f3d52; flex: 1 0 auto; margin-bottom: 12px; }
.ld-tcard.is-locked .ld-tcard-title { color: #5f6b7c; font-weight: 600; }
.ld-tstart { font-size: .82rem; color: #7a8698; font-weight: 700; }
.ld-tcard-quizzes { font-size: .8rem; color: #7a8698; font-weight: 700; margin-bottom: 7px; }
.ld-tcard .ld-tbar { width: 100%; margin-bottom: 10px; }
.ld-tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.ld-tcard-actions { display: flex; align-items: center; gap: 8px; }
.ld-lock-circle { width: 32px; height: 32px; border: 2px dashed #c3ccd8; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; filter: grayscale(1); opacity: .7; }
.ld-tbtn { border: 0; color: #fff; background: var(--c, var(--accent)); border-radius: 12px; padding: 8px 16px; font-weight: 800; font-size: .82rem; text-decoration: none; white-space: nowrap; box-shadow: 0 3px 9px color-mix(in srgb, var(--c, #7f77dd) 40%, transparent); transition: filter .12s ease, transform .12s ease; }
.ld-tbtn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Legend (dots) */
.ld-legend2 { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-top: 6px; font-size: .82rem; color: #6b7280; font-weight: 700; }
.ld-legend2 > span { display: inline-flex; align-items: center; gap: 7px; }
.lg-line { width: 22px; height: 4px; border-radius: 2px; background: #2f6fdb; }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; }
.lg-weak { background: #dc2626; }
.lg-good { background: #eab308; }
.lg-great { background: #16a34a; }

@media (max-width: 560px) {
    .ld-row-bottom { flex-wrap: wrap; gap: 8px 14px; }
    .ld-bar { flex: 1 1 100%; }
}
.tp-mastery { margin-left: 0.45rem; font-size: 0.72rem; font-weight: 800; border-radius: 999px; padding: 0.05rem 0.45rem; }
.tp-mastery.m-strong { background: #dcfce7; color: #166534; }
.tp-mastery.m-ok { background: #fff8e2; color: #a16207; }
.tp-mastery.m-weak { background: #fee2e2; color: #b91c1c; }
.tp-mastery.m-new { background: #eef0f4; color: #6b7280; }

/* Child "tasks from your grown-up" on the setup page */
.task-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.task-card { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; text-align: left; border: 2px solid #ffd27a; background: #fff8e2; border-radius: 14px; padding: 0.85rem 1rem; cursor: pointer; font: inherit; }
.task-card:hover { border-color: #f5b53d; }
.task-card.overdue { border-color: #f59e0b; background: #fff3d6; }
.task-main { display: flex; flex-direction: column; gap: 0.15rem; }
.task-title { font-weight: 800; color: #7a5b00; }
.task-reason { font-size: 0.8rem; color: #b45309; font-weight: 700; }

/* On-demand explainer (animated step-through) */
.explainer { max-width: 720px; margin: 0 auto; }
.exp-back { margin-bottom: 0.5rem; }
.exp-head { text-align: center; margin-bottom: 1rem; }
.exp-head h1 { font-weight: 900; margin: 0 0 0.3rem; }
.exp-head p { color: #6b7280; font-weight: 600; margin: 0; }
.exp-stage { display: flex; justify-content: center; margin: 0 auto 1.25rem; }
.exp-image { max-width: 100%; height: auto; border: 1px solid #eef0f4; border-radius: 16px; background: #fff; padding: 0.75rem; }
.exp-stage { flex-direction: column; align-items: center; gap: 0.5rem; }
.exp-clockwrap { position: relative; width: 220px; max-width: 70vw; }
.exp-clock { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(38,33,92,0.12)); }
.exp-clock-time { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: #26215c; color: #fff; font-weight: 900; border-radius: 999px; padding: 0.2rem 0.9rem; font-size: 1rem; letter-spacing: 0.02em; }
.exp-clock-caption { color: #6b7280; font-weight: 700; font-size: 0.92rem; margin-top: 0.5rem; }
.exp-clock-caption strong { color: #234E70; }
.exp-steps { display: flex; flex-direction: column; gap: 0.6rem; }
.exp-step { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid #eef0f4; border-radius: 14px; background: #fff; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.exp-step.is-shown { opacity: 1; transform: none; }
.exp-step.is-current { border-color: #7f77dd; box-shadow: 0 8px 22px rgba(127,119,221,0.18); }
.exp-step.exp-result.is-shown { background: #f0fdf4; border-color: #86efac; }
.exp-step-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #7f77dd; color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 0.9rem; }
.exp-step.exp-result .exp-step-num { background: #16a34a; }
.exp-step-body { display: flex; flex-direction: column; gap: 0.35rem; }
.exp-text { font-weight: 700; color: #26215c; }
.exp-math { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.exp-expr { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; background: #f5f6fb; border-radius: 8px; padding: 0.15rem 0.55rem; font-weight: 700; color: #4a44a0; }
.exp-value { font-weight: 900; color: #16a34a; }
.exp-answer { opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease; margin: 1.25rem 0 0; text-align: center; font-size: 1.15rem; padding: 0.9rem; border-radius: 14px; background: #fff8e2; border: 1px solid #ffe28a; }
.exp-answer.is-shown { opacity: 1; transform: none; }
.exp-answer strong { color: #234E70; }
.exp-controls { display: flex; gap: 0.5rem; justify-content: center; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.exp-controls button:disabled { opacity: 0.4; cursor: default; }
.app-user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 700;
    color: #374151;
    font-size: 0.9rem;
}
.app-user-chip svg { width: 18px; height: 18px; color: #9ca3af; flex: none; }
.app-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
    font-weight: 700;
    text-decoration: none;
}
.app-logout:hover { color: #111827; }
.app-menu-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    cursor: pointer;
}
.app-menu-btn:hover { background: #f9fafb; }

/* ===== Themed solo card (register, forgot, reset, confirm) ===== */
.auth-solo {
    max-width: 480px;
    box-shadow: var(--shadow-soft);
    border: 0.5px solid var(--card-border);
    animation: auth-rise 0.5s ease both;
}
.auth-solo-head {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-solo-ico {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.85rem;
    border-radius: 20px;
    background: var(--accent-tint);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-solo-head h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-deep);
    margin: 0;
}
.auth-solo-head p {
    color: #6b7280;
    font-weight: 600;
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
}
.btn-auth-soft {
    height: 50px;
    border: 2px solid var(--accent-tint);
    border-radius: 14px;
    background: #fff;
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: background 0.15s ease;
}
.btn-auth-soft:hover { background: var(--accent-tint); }
.auth-divider {
    border: 0;
    border-top: 1px solid #eef0f4;
    margin: 1.5rem 0;
}

/* ===== Dashboard streak banner ===== */
.streak-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--accent-grad, linear-gradient(160deg, #7f77dd, #534ab7));
    color: #fff;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.4rem;
    box-shadow: 0 8px 18px var(--accent-shadow, rgba(127, 119, 221, 0.3));
}
.streak-flame {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}
.streak-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}
.streak-label {
    font-weight: 700;
    opacity: 0.95;
    margin-top: 0.2rem;
}

/* ===== Learner dashboard ===== */
.dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.dash-head h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--accent-deep, #111827);
    margin: 0;
}
.dash-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.dash-chip {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #4b5563;
}
.dash-chip strong { color: var(--accent-strong, #111827); }

.btn-dash {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 46px;
    padding: 0 1.2rem;
    border: 0;
    border-radius: 14px;
    background: var(--accent, #4b5563);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px var(--accent-shadow, rgba(0, 0, 0, 0.15));
    transition: transform 0.08s ease, background 0.15s ease;
}
.btn-dash:hover { background: var(--accent-strong); color: #fff; }
.btn-dash:active { transform: scale(0.98); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-tile {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-soft);
}
.stat-ico {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1; color: #111827; }
.stat-label { font-weight: 700; color: #6b7280; font-size: 0.9rem; margin-top: 0.3rem; }
.ico-violet { background: #eeedfe; color: #534ab7; }
.ico-green { background: #eafaf0; color: #16a34a; }
.ico-amber { background: #fef6e7; color: #d97706; }
.ico-blue { background: #e6f1fb; color: #185fa5; }

/* Flip tiles */
.flip-tile {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    perspective: 1000px;
    height: 152px;
    width: 100%;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}
.flip-tile.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.flip-back { transform: rotateY(180deg); }
.flip-hint {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    color: #d1d5db;
    display: flex;
}
.flip-tile:hover .flip-hint { color: var(--accent, #9ca3af); }
.flip-back-title { font-weight: 800; color: #111827; font-size: 0.9rem; margin-bottom: 0.5rem; }
.flip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
    padding: 0.28rem 0;
}
.flip-row + .flip-row { border-top: 1px solid #f5f6f8; }
.flip-row b { color: #111827; font-size: 1.05rem; }
.flip-dot { display: inline-flex; align-items: center; gap: 0.45rem; }
.flip-dot span { width: 10px; height: 10px; border-radius: 3px; flex: none; }

@media (prefers-reduced-motion: reduce) {
    .flip-inner { transition: none; }
}

/* Generic auto-height flip (donut, subject cards) */
.flipc {
    perspective: 1200px;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: left;
    width: 100%;
    display: block;
}
.flipc-inner {
    position: relative;
    display: grid;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}
.flipc.flipped .flipc-inner { transform: rotateY(180deg); }
.flipc-face {
    grid-area: 1 / 1;
    position: relative;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.flipc-back { transform: rotateY(180deg); }
.flip-hint.br { top: auto; bottom: 0.75rem; right: 0.85rem; }
.flip-highlight {
    border-top: 1px solid #f1f2f6;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
}
.flip-highlight b { color: #111827; }

@media (prefers-reduced-motion: reduce) {
    .flipc-inner { transition: none; }
}

.dash-section { margin-top: 1.75rem; }
.dash-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommend-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    background: linear-gradient(160deg, #ffffff, #faf9ff);
    border: 1.5px solid var(--accent-tint, #eee);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
}
.recommend-left { display: flex; align-items: center; gap: 1rem; }
.recommend-ico {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 16px;
    background: var(--accent-tint);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}
.recommend-card h4 { margin: 0; font-weight: 800; color: var(--accent-deep); font-size: 1.05rem; }
.recommend-card p { margin: 0.15rem 0 0; color: #6b7280; font-weight: 600; font-size: 0.9rem; }

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.subject-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-soft);
}
.subject-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.subject-name { font-weight: 800; color: #111827; }
.subject-score { font-size: 1.6rem; font-weight: 800; color: #111827; }
.subject-meta { font-size: 0.82rem; color: #9ca3af; font-weight: 600; margin-top: 0.55rem; }

.status-badge { font-size: 0.72rem; font-weight: 800; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.status-strong { background: #eafaf0; color: #16a34a; }
.status-practice { background: #fef6e7; color: #b45309; }
.status-needs { background: #fdecec; color: #dc2626; }

.progress-track { height: 10px; border-radius: 999px; background: #f1f2f6; overflow: hidden; margin-top: 0.7rem; }
.progress-fill { height: 100%; border-radius: 999px; }
.fill-strong { background: #16a34a; }
.fill-practice { background: #f59e0b; }
.fill-needs { background: #ef4444; }

.topic-card { overflow: hidden; }
.topic-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.topic-table thead th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #9ca3af;
    font-weight: 800;
    padding: 0.7rem 1rem;
    background: #fafbfc;
}
.topic-table tbody td { padding: 0.8rem 1rem; border-top: 1px solid #f1f2f6; vertical-align: middle; }
.topic-title { font-weight: 800; color: #111827; }
.topic-sub { color: #9ca3af; font-weight: 600; font-size: 0.82rem; }

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.badge-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(160deg, #fffdf5, #ffffff);
    border: 1px solid #f3ecd3;
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}
.badge-medal {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    background: #fff4d6;
    color: #d99a00;
    display: flex;
    align-items: center;
    justify-content: center;
}
.badge-tile h5 { margin: 0; font-weight: 800; font-size: 0.98rem; color: #111827; }
.badge-tile p { margin: 0.1rem 0 0; color: #6b7280; font-weight: 600; font-size: 0.83rem; }

.dash-empty {
    color: #9ca3af;
    font-weight: 600;
    background: #fff;
    border: 1px dashed #e5e7eb;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

@media (max-width: 600px) {
    .stat-num { font-size: 1.6rem; }
    .dash-head h1 { font-size: 1.4rem; }
}

/* ===== Dashboard analytics (donut, radar, map, trend, focus) ===== */
.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
.insight-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
}
.insight-title { font-weight: 800; color: #111827; margin-bottom: 0.9rem; font-size: 1rem; }

.donut-wrap { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.9rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; color: #6b7280; font-weight: 700; }
.legend-item b { color: #111827; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }

.subject-bars { display: flex; flex-direction: column; gap: 0.75rem; }
.sbar-top { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #374151; margin-bottom: 0.3rem; }

.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.map-col-title { font-size: 0.8rem; font-weight: 800; margin-bottom: 0.6rem; }
.map-chips { display: flex; flex-direction: column; gap: 0.45rem; }
.map-chip { font-size: 0.82rem; font-weight: 700; padding: 0.4rem 0.7rem; border-radius: 9px; }
.map-strong { background: #eafaf0; color: #166534; }
.map-practice { background: #fef6e7; color: #92400e; }
.map-needs { background: #fdecec; color: #991b1b; }
.col-strong { color: #16a34a; }
.col-practice { color: #b45309; }
.col-needs { color: #dc2626; }
.map-empty { font-size: 0.8rem; color: #c4c8cf; font-weight: 600; }

.focus-card {
    background: linear-gradient(160deg, #faf9ff, #ffffff);
    border: 1.5px solid var(--accent-tint, #eee);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
}
.focus-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; }
.focus-item + .focus-item { border-top: 1px solid #f1f2f6; }
.focus-badge {
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}
.fb-practice { background: #eeedfe; color: #534ab7; }
.fb-help { background: #fdecec; color: #dc2626; }
.fb-review { background: #fff4d6; color: #d99a00; }
.focus-text { font-size: 0.9rem; color: #6b7280; font-weight: 600; }
.focus-text b { color: var(--accent-deep, #26215c); }

.trend-caption { font-size: 0.82rem; color: #6b7280; font-weight: 600; margin-top: 0.4rem; }

@media (max-width: 760px) {
    .insight-grid { grid-template-columns: 1fr; }
    .map-grid { grid-template-columns: 1fr; }
}

/* ===== Year at a glance (coverage + pacing) ===== */
.year-hero {
    background: var(--accent-grad, linear-gradient(160deg, #7f77dd, #534ab7));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: 0 10px 30px var(--accent-shadow, rgba(38, 33, 92, 0.18));
    margin-bottom: 1.5rem;
}
.yh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.yh-title { font-size: 1rem; font-weight: 700; opacity: 0.9; }
.yh-big { font-size: 2rem; font-weight: 800; margin-top: 0.15rem; }
.yh-big span { font-size: 1.05rem; font-weight: 700; opacity: 0.85; }
.yh-sub { font-size: 0.85rem; opacity: 0.8; margin-top: 0.15rem; }
.yh-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.yh-chip { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 800; display: flex; align-items: center; gap: 0.4rem; }
.yh-bar { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); overflow: hidden; display: flex; margin: 1rem 0 0.6rem; }
.yh-seg { height: 100%; }
.yh-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; font-weight: 700; opacity: 0.95; }
.yh-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 0.35rem; }
.yh-foot { display: flex; gap: 1.75rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.yh-stat b { font-size: 1.25rem; font-weight: 800; display: block; }
.yh-stat span { font-size: 0.8rem; opacity: 0.85; font-weight: 700; }

/* ===== Subject panels (coverage + study flow) ===== */
.subj-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.subj-panel {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
}
.subj-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.subj-name { font-weight: 800; color: #111827; display: flex; align-items: center; gap: 0.55rem; }
.subj-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-tint); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; flex: none; }
.subj-count { font-size: 0.85rem; color: #6b7280; font-weight: 700; }
.subj-cov-track { height: 8px; border-radius: 999px; background: #f1f2f6; overflow: hidden; display: flex; margin: 0.6rem 0 0.9rem; }
.subj-cov-seg { height: 100%; }
.strand-row { margin-bottom: 0.7rem; }
.strand-name { font-size: 0.72rem; font-weight: 800; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.35rem; }
.node-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.node { width: 16px; height: 16px; border-radius: 50%; background: #e5e7eb; display: inline-block; }
.node.mastered { background: #16a34a; }
.node.developing { background: #f59e0b; }
.node.growing { background: #ef4444; }
.node.notstarted { background: #e5e7eb; }
.node.next { width: 18px; height: 18px; border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.subj-next { margin-top: 0.5rem; font-size: 0.85rem; color: #6b7280; font-weight: 600; }
.subj-next b { color: var(--accent-deep); }

@media (max-width: 760px) {
    .subj-grid2 { grid-template-columns: 1fr; }
}

/* ===== Tabs + compact multi-visual grid ===== */
.tabs {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #eef0f4;
    margin: 1.5rem 0 1.1rem;
}
.tab-btn {
    border: 0;
    background: transparent;
    padding: 0.6rem 0.95rem;
    font: inherit;
    font-weight: 800;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--accent-strong); }
.tab-btn.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.mini-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.1rem;
}
.mini-card.span2 { grid-column: span 2; }
.mini-title { font-weight: 800; color: #111827; font-size: 0.92rem; margin-bottom: 0.7rem; }
.mini-center { display: flex; align-items: center; justify-content: center; }

/* Gauge + doughnut share the SVG; helpers below */
.gauge-num { font-size: 1.9rem; font-weight: 800; }

/* Scrollable activity list */
.act-list { display: flex; flex-direction: column; max-height: 250px; overflow-y: auto; }
.act-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; border-bottom: 0.5px solid #f1f2f6; }
.act-row:last-child { border-bottom: 0; }
.act-badge { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; background: var(--accent-tint); color: var(--accent-strong); }
.act-main { flex: 1; min-width: 0; }
.act-topic { font-size: 0.85rem; color: #111827; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-sub { font-size: 0.72rem; color: #9ca3af; font-weight: 600; }
.act-score { font-weight: 800; font-size: 0.9rem; }

/* Mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 130px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.35rem; height: 100%; }
.bar { width: 100%; max-width: 28px; border-radius: 6px 6px 0 0; background: var(--accent); min-height: 3px; }
.bar-label { font-size: 0.7rem; color: #9ca3af; font-weight: 700; }
.bar-val { font-size: 0.72rem; color: #6b7280; font-weight: 800; }

/* Horizontal subject bars */
.hbar-row { margin-bottom: 0.6rem; }
.hbar-top { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700; color: #374151; margin-bottom: 0.25rem; }

/* ===== Treasure map (two-tier) ===== */
.treasure {
    background: var(--accent-grad, linear-gradient(160deg, #7f77dd, #534ab7));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem 1.25rem;
    box-shadow: 0 10px 30px var(--accent-shadow, rgba(38, 33, 92, 0.18));
    margin-bottom: 1.5rem;
}
.treasure-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.treasure-title { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.treasure-streak { background: rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.8rem; font-weight: 800; }

/* Tier 1 — overworld islands */
.islands { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.5rem; }
.island {
    flex: none;
    width: 118px;
    border: 0;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 0.7rem 0.6rem;
    color: #fff;
    font: inherit;
    transition: background 0.15s ease;
}
.island:hover { background: rgba(255, 255, 255, 0.24); }
.island.current { background: #fff; color: #26215c; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.island-ico { font-size: 1.4rem; line-height: 1; }
.island-name { font-size: 0.78rem; font-weight: 800; margin-top: 0.3rem; line-height: 1.15; }
.island-prog { font-size: 0.72rem; font-weight: 700; opacity: 0.85; margin-top: 0.2rem; }
.island.current .island-prog { color: #7f77dd; opacity: 1; }
.island-strand { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; margin-top: 0.25rem; }

/* Tier 2 — the trail */
.island-trail { display: none; margin-top: 1rem; }
.island-trail.active { display: block; }
.trail-caption { font-size: 0.85rem; opacity: 0.92; margin-bottom: 0.4rem; }
.trail-caption b { font-weight: 800; }
.trail {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding: 3rem 0 0.25rem;
}
.trail-stop {
    flex: none;
    width: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}
.trail-stop:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 50%;
    width: 100%;
    border-top: 3px dotted rgba(255, 255, 255, 0.45);
    z-index: 0;
}
.trail-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}
.trail-dot.mastered { background: #25d07d; color: #0b3d24; }
.trail-dot.developing { background: #ffcf5c; color: #5a3d05; }
.trail-dot.growing { background: #ff8f6b; color: #4a1b0c; }
.trail-dot.notstarted { background: rgba(255, 255, 255, 0.18); border: 1px dashed rgba(255, 255, 255, 0.6); }
.trail-dot.next { width: 42px; height: 42px; background: #fff; color: #534ab7; border: 4px solid #ffcf5c; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.trail-dot.treasure { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(160deg, #ffd27a, #f5b53d); color: #5a3d05; }
.trail-label { font-size: 0.72rem; font-weight: 700; margin-top: 0.4rem; line-height: 1.15; }
.trail-score { font-size: 0.68rem; opacity: 0.85; }
.trail-nugget {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -105%);
    background: #fff;
    color: #26215c;
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
    min-width: 110px;
    white-space: nowrap;
}
.trail-nugget .tn-topic { font-size: 0.75rem; font-weight: 800; }
.trail-nugget .tn-go { font-size: 0.68rem; font-weight: 800; color: #534ab7; text-decoration: none; }

/* Treasure trail — separate light tile + wavy path */
.treasure { margin-bottom: 0.75rem; }
.treasure-trails {
    background: #fff;
    border: 0.5px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.5rem;
}
.island-trail { margin-top: 0; }
.trail-caption { color: var(--text-secondary); opacity: 1; font-weight: 600; }
.trail-caption b { color: var(--accent-deep); }
.trail-scroll { overflow-x: auto; width: 100%; }
.trail-canvas { position: relative; min-width: 100%; height: 170px; }
.trail-path { position: absolute; inset: 0; }
.trail-node { position: absolute; transform: translate(-50%, -18px); width: 104px; text-align: center; z-index: 1; }
.trail-node .trail-dot { margin: 0 auto; }
.trail-dot { background: #eef0f4; color: #6b7280; }
.trail-dot.notstarted { background: #e5e7eb; border: 1px dashed #b9bdc9; color: #9ca3af; }
.trail-node .trail-label { color: var(--text-primary); margin-top: 0.35rem; }
.trail-node .trail-score { color: var(--text-muted); }

/* ===== Quiz setup (Take Quiz) ===== */
.quiz-setup {
    max-width: 580px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
}
.quiz-setup-head { text-align: center; margin-bottom: 1.5rem; }
.quiz-setup-ico {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--accent-tint);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}
.quiz-setup-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--accent-deep); margin: 0; }
.quiz-setup-head p { color: #6b7280; font-weight: 600; margin: 0.25rem 0 0; }

.setup-field { margin-bottom: 1.25rem; }
.setup-label { display: block; font-size: 0.9rem; font-weight: 800; color: #374151; margin-bottom: 0.5rem; }

.setup-select {
    width: 100%;
    height: 52px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0 2.4rem 0 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}
.setup-select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.setup-select:disabled { background-color: #f9fafb; color: #9ca3af; }

.level-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.level-btn {
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 14px;
    padding: 0.65rem 1rem;
    min-width: 100px;
    text-align: center;
    cursor: pointer;
    font: inherit;
    color: #374151;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.level-btn:hover { border-color: var(--accent); }
.level-btn.active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }
.level-btn .level-stars { font-size: 1.05rem; line-height: 1; }
.level-btn small { display: block; font-weight: 700; margin-top: 0.2rem; }
.level-empty { color: #9ca3af; font-weight: 600; font-size: 0.9rem; }

.qty-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.qty-chip { position: relative; margin: 0; }
.qty-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qty-chip span {
    display: block;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.6rem 1.15rem;
    font-weight: 800;
    color: #374151;
    cursor: pointer;
}
.qty-chip input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }
.qty-chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-ring); }

.setup-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 0.75rem 1rem;
}
.setup-switch .form-check-input { width: 2.6rem; height: 1.45rem; margin: 0; cursor: pointer; }
.setup-switch label { font-weight: 700; color: #374151; margin: 0; cursor: pointer; }

.btn-quiz {
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-shadow: 0 8px 18px var(--accent-shadow);
    transition: background 0.15s ease, transform 0.08s ease;
}
.btn-quiz:hover { background: var(--accent-strong); color: #fff; }
.btn-quiz:active { transform: scale(0.98); }

/* Suggestions */
.setup-step-label { font-size: 0.78rem; font-weight: 800; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.5rem; }
.suggest-list { display: flex; flex-direction: column; gap: 0.5rem; }
.suggest-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #fff;
    border: 1.5px solid var(--accent-tint);
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    font: inherit;
    width: 100%;
    text-align: left;
    transition: border-color 0.12s ease;
}
.suggest-card:hover { border-color: var(--accent); }
.suggest-card.current { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-tint, #eef0ff); }
.suggest-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.si-continue { background: #eeedfe; }
.si-close { background: #fef6e7; }
.si-refresh { background: #eafaf0; }
.si-practice { background: #fdecec; }
.suggest-main { flex: 1; min-width: 0; }
.suggest-topic { font-weight: 800; color: #111827; font-size: 0.95rem; }
.suggest-reason { font-size: 0.8rem; color: #6b7280; font-weight: 600; }
.suggest-go { color: var(--accent-strong); font-weight: 800; font-size: 0.85rem; flex: none; }

.setup-divider { display: flex; align-items: center; gap: 0.75rem; color: #9ca3af; font-size: 0.85rem; font-weight: 600; margin: 1.25rem 0; }
.setup-divider::before, .setup-divider::after { content: ""; flex: 1; height: 1px; background: #eef0f4; }

/* Drill-down */
.strand-cards { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.strand-card {
    flex: 1;
    min-width: 130px;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 14px;
    padding: 0.9rem 0.6rem;
    text-align: center;
    cursor: pointer;
    font: inherit;
    color: #374151;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.strand-card:hover { border-color: var(--accent); }
.strand-card.active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }
.strand-card .sc-ico { font-size: 1.4rem; line-height: 1; }
.strand-card .sc-name { font-size: 0.85rem; font-weight: 800; margin-top: 0.25rem; }
.strand-card .sc-count { font-size: 0.72rem; font-weight: 700; color: #9ca3af; margin-top: 0.15rem; }
.strand-card.active .sc-count { color: var(--accent-strong); }

.chip-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
}
.chip:hover { border-color: var(--accent); }
.chip.active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }

.topic-pills { display: flex; flex-direction: column; gap: 0.5rem; }
.topic-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    font: inherit;
    color: #111827;
    text-align: left;
    width: 100%;
}
.topic-pill:hover { border-color: var(--accent); }
.topic-pill.active { border-color: var(--accent); background: var(--accent-tint); }
.topic-pill .tp-name { font-weight: 700; font-size: 0.95rem; }
.topic-pill .tp-meta { font-size: 0.78rem; color: #9ca3af; font-weight: 700; flex: none; }

/* Coach split layout on the quiz setup page */
.coach-split {
    display: flex;
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border: 0.5px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.coach-panel {
    flex: 1 1 36%;
    background: var(--accent-grad, linear-gradient(160deg, #7f77dd, #534ab7));
    color: #fff;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.coach-main { flex: 1 1 64%; min-width: 0; padding: 1.75rem; }
.coach-hi { font-size: 1.4rem; font-weight: 800; }
.coach-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-weight: 800;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.coach-stat { background: rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 0.9rem 1rem; }
.coach-stat b { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.coach-stat span { font-size: 0.85rem; opacity: 0.9; font-weight: 700; }
.coach-card { background: rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 0.9rem 1rem; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
.coach-card-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.8; font-weight: 800; margin-bottom: 0.3rem; }
.coach-tip { transition: opacity 0.4s ease; }

@media (max-width: 820px) {
    .coach-split { flex-direction: column; }
    .coach-main { padding: 1.25rem; }
}

/* "Mix it up" (strand) card */
.mix-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(160deg, #faf9ff, #ffffff);
    border: 1.5px solid var(--accent);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    width: 100%;
    font: inherit;
    text-align: left;
}
.mix-card:hover { background: var(--accent-tint); }
.mix-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.2rem; }
.mix-main { flex: 1; min-width: 0; }
.mix-title { font-weight: 800; color: var(--accent-deep); font-size: 0.95rem; }
.mix-sub { font-size: 0.8rem; color: #6b7280; font-weight: 600; }
.mix-go { color: var(--accent-strong); font-weight: 800; font-size: 0.85rem; flex: none; }

/* Big Challenge (exam) paper cards */
.paper-cards { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.paper-card {
    flex: 1;
    min-width: 150px;
    border: 2px solid var(--accent-tint);
    background: linear-gradient(160deg, #faf9ff, #ffffff);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.paper-card:hover { border-color: var(--accent); }
.paper-title { font-weight: 800; color: var(--accent-deep); font-size: 1rem; }
.paper-meta { font-size: 0.82rem; color: #374151; font-weight: 700; margin-top: 0.2rem; }
.paper-calc { font-size: 0.75rem; color: #9ca3af; font-weight: 600; margin-top: 0.1rem; }

/* Coach live summary rows */
.cs-row { font-size: 0.9rem; font-weight: 700; padding: 0.15rem 0; }

/* ===== Quiz result ===== */
.result-wrap { max-width: 640px; margin: 0 auto; }
.result-card {
    background: var(--accent-grad, linear-gradient(160deg, #7f77dd, #534ab7));
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.result-emoji { font-size: 2.6rem; line-height: 1; }
.result-title { font-size: 1.4rem; font-weight: 800; margin-top: 0.35rem; }
.result-score { font-size: 2.6rem; font-weight: 800; margin-top: 0.75rem; line-height: 1; }
.result-pct { font-size: 1rem; font-weight: 700; opacity: 0.9; margin-top: 0.35rem; }
.result-sub { font-size: 0.85rem; opacity: 0.85; margin-top: 0.5rem; }

.result-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.btn-dash-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 46px;
    padding: 0 1.2rem;
    border: 2px solid var(--accent-tint);
    border-radius: 14px;
    background: #fff;
    color: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
}
.btn-dash-soft:hover { background: var(--accent-tint); }

.bd-row { padding: 0.6rem 0; border-top: 1px solid #f1f2f6; }
.bd-row:first-child { border-top: 0; }
.bd-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #111827; margin-bottom: 0.35rem; }
.bd-meta { font-size: 0.8rem; color: #9ca3af; font-weight: 700; margin-top: 0.35rem; }

/* ===== Program on-track pill (parent Assignments) ===== */
.prog-pill { display: inline-block; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.prog-pill.ontrack { background: #dcfce7; color: #166534; }
.prog-pill.behind { background: #fef3c7; color: #b45309; }
.prog-pill.neu { background: #eef0f4; color: #6b7280; }

/* ===== Assignments: two-column status + setup, segmented control ===== */
.asg-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 820px) {
    .asg-grid.has-status { grid-template-columns: 1fr 1fr; }
    .asg-grid.has-status .asg-col-status { position: sticky; top: 1rem; }
}
.asg-col { min-width: 0; }   /* let grid children shrink instead of overflowing */
.asg-status { border: 1px solid #e4ecf2; border-radius: 16px; padding: 14px 16px; background: #f8fbfd; margin-bottom: 0; }
.asg-status .asg-h { font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; margin: 0 0 .5rem; }
.asg-status .asg-h + .asg-h { margin-top: 1rem; }
.asg-status .device-list { margin: 0; }
.asg-status .device-list { max-height: 420px; overflow-y: auto; }
/* Zebra striping for the Active tasks list — flush rows so the stripes read as one scannable block. */
.asg-status .asg-tasks { gap: 0; border: 1px solid #e4ecf2; border-radius: 12px; overflow-y: auto; }
.asg-status .asg-tasks .device-row { border-radius: 0; padding: 10px 12px; }
.asg-status .asg-tasks .device-row:nth-child(odd) { background: #ffffff; }
.asg-status .asg-tasks .device-row:nth-child(even) { background: #eef4f9; }
.asg-seg { display: inline-flex; gap: 4px; padding: 4px; background: #eef0f4; border-radius: 12px; margin-bottom: 1.2rem; }
.asg-seg-btn { border: none; background: transparent; font: inherit; font-weight: 700; color: #6b7280; padding: 8px 16px; border-radius: 9px; cursor: pointer; transition: background .12s, color .12s; }
.asg-seg-btn.active { background: #fff; color: #234E70; box-shadow: 0 1px 3px rgba(35,78,112,.12); }
.asg-panel[hidden] { display: none; }
/* Program form: two fields per row on wider screens, halving the form's height. */
.asg-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.asg-form-grid .setup-field { margin-bottom: 1rem; }
.asg-form-grid .asg-span2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .asg-form-grid { grid-template-columns: 1fr; } }
.asg-settings { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid #e4ecf2; }
.tf-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; color: #234E70; }
.tf-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tf-track { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: #cfd6df; transition: background .15s; }
.tf-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.tf-toggle input:checked + .tf-track { background: #27C5D9; }
.tf-toggle input:checked + .tf-track::after { transform: translateX(18px); }
.tf-toggle input:focus-visible + .tf-track { outline: 2px solid #234E70; outline-offset: 2px; }

/* ===== Learner "tasks first" soft nudge (escapable overlay) ===== */
.tf-nudge { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(35,78,112,.45); backdrop-filter: blur(2px); animation: tf-fade .15s ease-out; }
@keyframes tf-fade { from { opacity: 0; } to { opacity: 1; } }
.tf-nudge-card { max-width: 400px; width: 100%; background: #fff; border-radius: 20px; padding: 28px 26px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tf-nudge-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: .5rem; }
.tf-nudge-card h2 { font-size: 1.25rem; font-weight: 900; color: #234E70; margin: 0 0 .5rem; }
.tf-nudge-card p { color: #4b5563; font-size: .96rem; margin: 0 0 1.3rem; }
.tf-nudge-actions { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
.tf-nudge-actions .btn-auth { margin: 0; }
.tf-nudge-skip { border: none; background: transparent; font: inherit; font-weight: 700; color: #6b7280; text-decoration: underline; cursor: pointer; padding: 6px; }
.tf-nudge-skip:hover { color: #234E70; }

/* ===== Reusable confirm modal (site.js) ===== */
.cf-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.cf-modal[hidden] { display: none; }
.cf-backdrop { position: absolute; inset: 0; background: rgba(30, 27, 75, .55); backdrop-filter: blur(3px); }
.cf-card { position: relative; background: #fff; border-radius: 16px; max-width: 420px; width: 100%; padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: cf-pop .16s ease; }
@keyframes cf-pop { from { transform: scale(.96); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.cf-msg { font-size: 1.05rem; font-weight: 700; color: #1f2937; margin: 0 0 1.1rem; line-height: 1.4; }
.cf-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.cf-btn { font-family: inherit; font-weight: 800; border-radius: 11px; padding: .6rem 1.2rem; cursor: pointer; border: 1px solid transparent; font-size: .95rem; }
.cf-cancel { background: #eef0f4; color: #374151; }
.cf-cancel:hover { background: #e2e6ec; }
.cf-ok { background: var(--accent, #7f77dd); color: #fff; }
.cf-ok:hover { filter: brightness(.95); }
@media (prefers-reduced-motion: reduce) { .cf-card { animation: none; } }

/* ===== Quiz answering screen ===== */
.quiz-wrap { max-width: 960px; margin: 0 auto; }
.quiz-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--accent-deep);
    font-size: 0.95rem;
}
.quiz-progress-track { height: 10px; border-radius: 999px; background: #eef0f4; overflow: hidden; margin-bottom: 1.25rem; }
.quiz-progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.quiz-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem 2.25rem 2.25rem;
}
.quiz-image { text-align: center; margin-bottom: 1.25rem; }
.quiz-image img { max-height: 420px; max-width: 100%; border: 1px solid #eef0f4; border-radius: 14px; background: #fff; padding: 0.5rem; }
.quiz-stem { font-size: 1.6rem; font-weight: 800; color: #111827; line-height: 1.35; margin-bottom: 1.5rem; }

.opt { display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: #111827;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.opt:hover .opt-box { border-color: var(--accent); }
.opt input:checked + .opt-box { border-color: var(--accent); background: var(--accent-tint); }
.opt input:focus-visible + .opt-box { box-shadow: 0 0 0 4px var(--accent-ring); }
.opt-letter {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef0f4;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex: none;
}
.opt input:checked + .opt-box .opt-letter { background: var(--accent); color: #fff; }

.quiz-timer { background: var(--accent-tint); color: var(--accent-strong); border-radius: 999px; padding: 0.2rem 0.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.quiz-timer-low { background: #fdecec; color: #dc2626; }

/* Sticky, hide-on-scroll top bar */
.app-header { position: sticky; top: 0; z-index: 50; transition: transform 0.25s ease; }
.app-header.nav-hidden { transform: translateY(-100%); }

.app-user-chip-link { text-decoration: none; cursor: pointer; transition: background 0.15s ease; }
.app-user-chip-link:hover { background: #e9eaee; }
.chip-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--kid-tint); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }

/* Avatar picker */
.avatar-card {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    text-align: center;
}
.avatar-current {
    font-size: 3.4rem;
    width: 110px;
    height: 110px;
    line-height: 1;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--accent-tint);
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-card h1 { font-size: 1.4rem; font-weight: 800; color: var(--accent-deep); margin: 0; }
.avatar-card p { color: #6b7280; font-weight: 600; margin: 0.25rem 0 1rem; }
.avatar-saved { color: #16a34a; font-weight: 800; margin-bottom: 0.75rem; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 0.6rem; margin-bottom: 1.25rem; }
.avatar-opt {
    font-size: 2rem;
    border: 2px solid #eef0f4;
    background: #fff;
    border-radius: 16px;
    padding: 0.4rem;
    cursor: pointer;
    aspect-ratio: 1;
    line-height: 1;
}
.avatar-opt:hover { border-color: var(--accent); }
.avatar-opt.active { border-color: var(--accent); background: var(--accent-tint); }

/* ===== Answer review ===== */
.review-wrap { max-width: 720px; margin: 0 auto; }
.review-link { color: var(--accent-strong); font-weight: 800; text-decoration: none; white-space: nowrap; }
.review-link:hover { text-decoration: underline; }
.review-q {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.review-num { font-weight: 800; color: #9ca3af; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.02em; }
.review-badge { font-size: 0.75rem; font-weight: 800; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.review-correct { background: #eafaf0; color: #16a34a; }
.review-wrong { background: #fdecec; color: #dc2626; }
.review-stem { font-weight: 800; color: #111827; font-size: 1.05rem; margin-bottom: 0.75rem; line-height: 1.35; }
.review-opt { display: flex; align-items: center; gap: 0.6rem; border: 2px solid #eef0f4; border-radius: 12px; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; font-weight: 600; color: #111827; }
.review-opt.is-correct { border-color: #16a34a; background: #eafaf0; }
.review-opt.is-chosen-wrong { border-color: #ef4444; background: #fdecec; }
.review-opt-mark { margin-left: auto; font-weight: 800; font-size: 0.82rem; white-space: nowrap; }
.review-typed { font-weight: 700; color: #111827; line-height: 1.6; }
.review-explain { background: var(--accent-tint); color: var(--accent-deep); border-radius: 12px; padding: 0.75rem 0.9rem; margin-top: 0.7rem; font-weight: 600; font-size: 0.92rem; line-height: 1.5; }
.review-explain-label { font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.8; margin-bottom: 0.25rem; }

/* ===== Parent: learner cards ===== */
.learner-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.learner-top { display: flex; align-items: center; gap: 0.85rem; }
.learner-avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex: none; }
.learner-id { flex: 1; min-width: 0; }
.learner-name { font-weight: 800; color: #111827; font-size: 1.05rem; }
.learner-meta { font-size: 0.82rem; color: #9ca3af; font-weight: 600; }
.learner-stats { display: flex; gap: 0.6rem; }
.learner-stat { flex: 1; background: #f9fafb; border-radius: 12px; padding: 0.6rem; text-align: center; }
.learner-stat b { display: block; font-size: 1.05rem; font-weight: 800; color: #111827; }
.learner-stat span { font-size: 0.72rem; color: #6b7280; font-weight: 700; }
.learner-actions { display: flex; gap: 0.5rem; }
.learner-actions .btn-dash, .learner-actions .btn-dash-soft { height: 40px; padding: 0 0.9rem; font-size: 0.9rem; flex: 1; justify-content: center; }

.parent-form-card { max-width: 520px; }

/* ===== Trends: sparklines + heatmap ===== */
.spark-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.spark-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.1rem;
}
.spark-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.spark-name { font-weight: 800; color: #111827; }
.spark-cur { font-weight: 800; color: #111827; }
.spark-delta { font-size: 0.78rem; font-weight: 800; margin-top: 0.3rem; }
.spark-up { color: #16a34a; }
.spark-down { color: #dc2626; }
.spark-flat { color: #9ca3af; }

.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 300px; }
.hm-cell { aspect-ratio: 1; border-radius: 4px; background: #eef0f4; }
.hm-1 { background: var(--accent-tint); }
.hm-2 { background: var(--accent); }
.hm-3 { background: var(--accent-strong); }
.hm-legend { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: #9ca3af; font-weight: 700; margin-top: 0.75rem; }
.hm-legend .hm-cell { width: 14px; height: 14px; aspect-ratio: auto; display: inline-block; }
.code-reveal { background: var(--accent-tint); color: var(--accent-deep); border-radius: 14px; padding: 1rem 1.1rem; margin-top: 1.25rem; text-align: center; }
.code-reveal .code-value { font-size: 1.6rem; font-weight: 800; letter-spacing: 2px; margin: 0.35rem 0; }

/* TableInput (9th answer format) — type a frequency into each row */
.tbl-input { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.tbl-input th, .tbl-input td { border: 1px solid #e2e8f0; padding: .55rem .75rem; text-align: left; font-size: 1rem; }
.tbl-input thead th { background: #f1f5f9; font-weight: 700; }
.tbl-input .tbl-lbl { font-weight: 600; }
.tbl-input .tbl-cell { width: 5.5rem; padding: .4rem .5rem; border: 1.5px solid #cbd5e1; border-radius: .5rem; font-size: 1rem; }
.tbl-input .tbl-cell:focus { outline: none; border-color: #7c6df2; box-shadow: 0 0 0 3px rgba(124,109,242,.18); }
.tbl-input tfoot .tbl-total { font-weight: 800; color: #4c3fd0; }
