/* EduSmart design system for the website: the same colours, type and cards as the app
   (WebsmeUI/Resources/Styles), laid out for phones first and widened for tablets and desktops.
   Used by the static pages (privacy, terms, support, account deletion) and the signed-in learner pages. Classes start with "es-"
   so they never clash with the older styles in app.css. */

@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --es-royal: #000096;
  --es-royal-deep: #00006E;
  --es-blue: #0093CC;
  --es-blue-soft: #E6F4FB;
  --es-on-royal: #C9D2FF;
  --es-ink: #12163F;
  --es-muted: #5D6380;
  --es-tint: #F4F7FC;
  --es-line: #E3E8F0;
  --es-gold: #1592D3;
  --es-success: #1E9E6A;
  --es-success-soft: #E7F7EF;
  --es-danger: #D64545;
  --es-danger-soft: #FDECEC;
  --es-radius: 16px;
  --es-shadow: 0 6px 24px rgba(18, 22, 63, .08);
  --es-font: 'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.es-page { font-family: var(--es-font); color: var(--es-ink); background: #fff; margin: 0; min-height: 100vh;
           display: flex; flex-direction: column; -webkit-text-size-adjust: 100%; line-height: 1.5; }
.es-page *, .es-page *::before, .es-page *::after { box-sizing: border-box; }
.es-page a { color: var(--es-blue); }
.es-page img { max-width: 100%; }
.es-main { flex: 1; }
.es-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.es-narrow { max-width: 760px; }
.es-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header and footer ---------- */
.es-header { background: var(--es-royal); color: #fff; position: sticky; top: 0; z-index: 20; }
.es-header .es-wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.es-header .es-logo img { height: 28px; width: auto; display: block; }
.es-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.es-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.es-nav a:hover, .es-nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); }
.es-nav .es-nav-cta { background: var(--es-blue); }
.es-nav .es-nav-cta:hover { background: #0083B8; }
@media (max-width: 599px) { .es-nav .es-hide-sm { display: none; } .es-nav a { padding: 8px 10px; font-size: 14px; } }

.es-footer { background: var(--es-ink); color: #C7CBE0; margin-top: 48px; font-size: 14px; }
.es-footer .es-wrap { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; }
.es-footer h2 { color: #fff; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 10px; }
.es-footer ul { list-style: none; margin: 0; padding: 0; }
.es-footer li { margin-bottom: 8px; }
.es-footer a { color: #C7CBE0; text-decoration: none; }
.es-footer a:hover { color: #fff; text-decoration: underline; }
.es-footer .es-copy { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; grid-column: 1 / -1; }
@media (min-width: 720px) { .es-footer .es-wrap { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ---------- Type ---------- */
.es-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--es-blue); margin: 0 0 6px; }
.es-h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
.es-h2 { font-size: 20px; line-height: 1.3; margin: 28px 0 12px; font-weight: 700; }
.es-muted { color: var(--es-muted); }
.es-small { font-size: 13px; }
@media (min-width: 900px) { .es-h1 { font-size: 36px; } .es-h2 { font-size: 22px; } }

/* ---------- Hero band (the app's royal header) ---------- */
.es-hero { background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); color: #fff; padding: 28px 0 32px;
           border-radius: 0 0 28px 28px; }
.es-hero .es-h1 { color: #fff; }
.es-hero p { color: var(--es-on-royal); margin: 0; font-size: 16px; }
.es-hero .es-eyebrow { color: #7FD3F2; }
.es-crumbs { font-size: 13px; margin: 0 0 12px; color: var(--es-on-royal); }
.es-crumbs a { color: #fff; text-decoration: none; }
.es-crumbs a:hover { text-decoration: underline; }
.es-crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }
@media (min-width: 900px) { .es-hero { padding: 40px 0 44px; border-radius: 0 0 36px 36px; } .es-hero p { font-size: 18px; } }

/* ---------- Cards ---------- */
.es-card { display: block; background: #fff; border: 1px solid var(--es-line); border-radius: var(--es-radius); padding: 16px;
           color: inherit; text-decoration: none; }
a.es-card, button.es-card { cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
a.es-card:hover, button.es-card:hover { border-color: #C9D3E4; box-shadow: var(--es-shadow); }
a.es-card:focus-visible, button.es-card:focus-visible { outline: 3px solid var(--es-blue); outline-offset: 2px; }
.es-card-tint { background: var(--es-tint); border-color: transparent; }
.es-card-hero { background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); color: #fff; border: 0; border-radius: 18px; }
.es-card-hero .es-card-sub { color: var(--es-on-royal); }
.es-card-danger { background: var(--es-danger-soft); border-color: #F5C6C6; }
.es-row { display: flex; align-items: center; gap: 12px; }
.es-row > .es-grow { flex: 1; min-width: 0; }
.es-card-title { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.3; }
.es-card-sub { font-size: 13px; color: var(--es-muted); margin: 2px 0 0; }
.es-chevron { width: 24px; height: 24px; flex-shrink: 0; }
.es-badge { width: 44px; height: 44px; border-radius: 14px; background: var(--es-blue-soft); display: flex; align-items: center;
            justify-content: center; flex-shrink: 0; font-weight: 700; font-size: 18px; color: #fff; }
.es-badge img { width: 24px; height: 24px; }
.es-badge-navy { background: var(--es-royal); }
.es-badge-glass { background: rgba(255, 255, 255, .15); }
.es-plus { background: var(--es-gold); color: #fff; font-weight: 700; font-size: 11px; padding: 2px 8px;
           border-radius: 10px; letter-spacing: .5px; flex-shrink: 0; }
.es-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--es-blue-soft); color: var(--es-royal);
           font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.es-chip-danger { background: var(--es-danger-soft); color: var(--es-danger); }

/* Grids that become columns on wider screens */
.es-stack { display: grid; gap: 12px; }
.es-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .es-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1040px) { .es-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Progress ---------- */
.es-progress { height: 8px; background: var(--es-line); border-radius: 8px; overflow: hidden; flex: 1; }
.es-progress > span { display: block; height: 100%; background: var(--es-blue); border-radius: 8px; }
.es-pct { font-weight: 700; color: var(--es-blue); font-size: 14px; }

/* ---------- Buttons and forms ---------- */
.es-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px;
          border-radius: 14px; border: 0; background: var(--es-royal); color: #fff; font: 700 16px var(--es-font);
          text-decoration: none; cursor: pointer; }
.es-page a.es-btn { color: #fff; }
.es-btn:hover { background: var(--es-royal-deep); }
.es-btn:disabled { opacity: .55; cursor: default; }
.es-btn-accent { background: var(--es-blue); }
.es-btn-accent:hover { background: #0083B8; }
.es-btn-outline { background: #fff; color: var(--es-royal); border: 1px solid var(--es-line); }
.es-page a.es-btn-outline { color: var(--es-royal); }
.es-btn-outline:hover { background: var(--es-tint); }
.es-btn-on-royal { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.es-btn-on-royal:hover { background: rgba(255, 255, 255, .1); }
.es-btn-block { width: 100%; }
.es-btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.es-link { background: none; border: 0; padding: 6px 0; color: var(--es-blue); font: 700 15px var(--es-font); cursor: pointer; text-decoration: none; }
.es-field { display: grid; gap: 6px; margin-bottom: 14px; }
.es-field label { font-weight: 600; font-size: 14px; }
.es-input, .es-select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--es-line); border-radius: 12px;
                        font: 400 16px var(--es-font); color: var(--es-ink); background: #fff; }
.es-input:focus, .es-select:focus { outline: none; border-color: var(--es-blue); box-shadow: 0 0 0 3px var(--es-blue-soft); }
.es-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.es-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--es-royal); }
.es-alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.es-alert-error { background: var(--es-danger-soft); color: #9B2C2C; }
.es-alert-ok { background: var(--es-success-soft); color: #136C35; }

/* ---------- Text pages (privacy, terms, support) ---------- */
.es-prose { font-size: 16px; line-height: 1.7; }
.es-prose h2 { font-size: 21px; margin: 32px 0 10px; line-height: 1.3; }
.es-prose h3 { font-size: 17px; margin: 22px 0 8px; }
.es-prose p, .es-prose ul, .es-prose ol { margin: 0 0 14px; }
.es-prose ul, .es-prose ol { padding-left: 22px; }
.es-prose li { margin-bottom: 6px; }
.es-prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 16px; display: block; overflow-x: auto; }
.es-prose th, .es-prose td { border: 1px solid var(--es-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.es-prose th { background: var(--es-tint); }
.es-prose blockquote { margin: 16px 0; padding: 12px 16px; background: var(--es-blue-soft); border-left: 4px solid var(--es-blue); border-radius: 8px; }
.es-prose blockquote p:last-child { margin: 0; }

/* ---------- Lesson reading (same look as the app's lesson view) ---------- */
.es-lesson { font-size: 17px; line-height: 1.65; }
.es-lesson p { margin: 0 0 14px; }
.es-lesson p.lead { font-size: 19px; line-height: 1.55; font-weight: 500; }
.es-lesson strong { color: var(--es-royal); }
.es-lesson h2, .es-lesson h3 { line-height: 1.3; margin: 22px 0 10px; }
.es-lesson h2 { font-size: 20px; } .es-lesson h3 { font-size: 18px; }
.es-lesson ul, .es-lesson ol { padding-left: 22px; margin: 0 0 14px; } .es-lesson li { margin-bottom: 6px; }
.es-lesson table { border-collapse: collapse; width: 100%; font-size: 15px; margin-bottom: 14px; display: block; overflow-x: auto; }
.es-lesson td, .es-lesson th { border: 1px solid var(--es-line); padding: 8px; text-align: left; }
.es-lesson th { background: var(--es-blue-soft); }
.es-lesson code { font-family: var(--es-font); font-weight: 700; color: var(--es-royal); }
.es-lesson blockquote { border-left: 4px solid var(--es-blue); margin: 14px 0; padding: 8px 14px; background: var(--es-blue-soft); border-radius: 8px; }
.es-lesson .example, .es-lesson .tip, .es-lesson .key, .es-lesson .definition, .es-lesson .formula {
  border-radius: 14px; padding: 12px 14px 2px; margin: 4px 0 16px; position: relative; }
.es-lesson .example::before, .es-lesson .tip::before, .es-lesson .key::before, .es-lesson .definition::before {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.es-lesson .example { background: #EEF8FD; border: 1px solid #BFE6F6; }
.es-lesson .example::before { content: '\270E  Worked example'; color: var(--es-blue); }
.es-lesson .tip { background: #FFF7E8; border: 1px solid #FBE0A9; }
.es-lesson .tip::before { content: '\2605  Remember'; color: #B7791F; }
.es-lesson .key { background: #EEEEFB; border: 1px solid #CFCFF3; }
.es-lesson .key::before { content: '\25C6  Key idea'; color: var(--es-royal); }
.es-lesson .definition { background: var(--es-tint); border-left: 4px solid var(--es-royal); }
.es-lesson .definition::before { content: 'Definition'; color: var(--es-royal); }
.es-lesson .formula { background: #fff; border: 2px dashed #BFE6F6; text-align: center; padding: 12px; font-size: 19px; }
.es-lesson .formula p { margin: 0; }
.es-lesson .seq { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; margin: 2px 0; }
.es-lesson .seq span { min-width: 30px; text-align: center; background: var(--es-blue-soft); color: var(--es-royal); font-weight: 700;
                       border-radius: 8px; padding: 1px 8px; font-size: 16px; }
.es-lesson .seq span.more { background: none; min-width: 0; padding: 0; }
.es-lesson .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.es-lesson img { height: auto; border-radius: 12px; display: block; margin: 8px auto 14px; }

/* Lesson page layout: reading column, with the topic's contents beside it on wide screens */
.es-reader { display: grid; gap: 24px; padding-top: 24px; }
.es-reader article { min-width: 0; max-width: 760px; }
.es-toc { font-size: 14px; }
.es-toc h2 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--es-muted); margin: 0 0 8px; }
.es-toc ol { list-style: none; margin: 0 0 16px; padding: 0; }
.es-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--es-ink); text-decoration: none; }
.es-toc a:hover { background: var(--es-tint); }
@media (min-width: 1040px) {
  .es-reader { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
  .es-toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
}
.es-lesson-head { background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); color: #fff; border-radius: 18px;
                  padding: 18px; margin: 32px 0 18px; scroll-margin-top: 80px; }
.es-lesson-head:first-child { margin-top: 0; }
.es-lesson-head .es-eyebrow { color: #7FD3F2; }
.es-lesson-head h2 { color: #fff; font-size: 22px; margin: 4px 0 10px; line-height: 1.25; }
.es-lesson-head .es-chip { background: rgba(255, 255, 255, .14); color: #fff; }

/* Call to action band */
.es-cta { background: var(--es-tint); border-radius: 20px; padding: 22px; display: grid; gap: 14px; margin: 32px 0 0; }
.es-cta h2 { margin: 0; font-size: 20px; }
.es-cta p { margin: 0; color: var(--es-muted); }
.es-cta .es-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 720px) { .es-cta { grid-template-columns: 1fr auto; align-items: center; padding: 28px 32px; } }

/* ---------- Signed-in app shell ---------- */
.es-app-hero { background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); color: #fff; border-radius: 0 0 28px 28px;
               padding: 18px 0 22px; }
.es-app-hero .es-greet { font-size: 26px; font-weight: 700; margin: 0; }
.es-app-hero .es-sub { color: var(--es-on-royal); margin: 2px 0 0; }
.es-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.es-stat { background: rgba(255, 255, 255, .1); border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.es-stat img { width: 28px; height: 28px; }
.es-stat b { display: block; font-size: 24px; line-height: 1.1; }
.es-stat small { color: var(--es-on-royal); font-size: 13px; }
.es-stat-wide { grid-column: 1 / -1; display: block; }
.es-stat-wide .es-progress { background: rgba(255, 255, 255, .2); margin-top: 8px; }
@media (min-width: 900px) {
  .es-stats { grid-template-columns: 1fr 1fr 2fr; }
  .es-stat-wide { grid-column: auto; }
}
.es-icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: inline-flex;
               align-items: center; justify-content: center; cursor: pointer; }
.es-icon-btn:hover { background: rgba(255, 255, 255, .12); }
.es-icon-btn img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.es-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.es-section-head h2 { font-size: 18px; margin: 0; }
.es-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none;
               border: 0; background: none; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.es-list-row:hover { background: var(--es-tint); }
.es-list-row img.es-ic { width: 24px; height: 24px; flex-shrink: 0; }
.es-divider { height: 1px; background: var(--es-line); margin: 4px 16px 0; }
.es-center { text-align: center; }
.es-spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--es-blue-soft); border-top-color: var(--es-blue);
              animation: es-spin .8s linear infinite; margin: 48px auto; }
@keyframes es-spin { to { transform: rotate(360deg); } }

/* Practice */
.es-option { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px;
             border: 1.5px solid var(--es-line); background: #fff; font: 500 16px var(--es-font); color: var(--es-ink); cursor: pointer; }
.es-option:hover:not(:disabled) { border-color: var(--es-blue); }
.es-option .es-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--es-tint); display: inline-flex;
                        align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.es-option.is-selected { border-color: var(--es-royal); background: #F3F3FD; }
.es-option.is-right { border-color: var(--es-success); background: var(--es-success-soft); }
.es-option.is-wrong { border-color: var(--es-danger); background: var(--es-danger-soft); }
.es-feedback { border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.es-feedback.is-right { background: var(--es-success-soft); }
.es-feedback.is-wrong { background: var(--es-danger-soft); }

/* Sign-in pages: royal background like the app's welcome screen */
.es-auth { background: var(--es-royal); color: #fff; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.es-auth-inner { width: 100%; max-width: 440px; }
.es-auth .es-logo-big { display: block; width: 220px; height: auto; margin: 0 auto 20px; }
.es-auth h1 { font-size: 22px; text-align: center; margin: 0 0 6px; }
.es-auth .es-tag { color: var(--es-on-royal); text-align: center; margin: 0 0 24px; }
.es-auth .es-panel { background: #fff; color: var(--es-ink); border-radius: 20px; padding: 22px; }
.es-auth .es-under { color: var(--es-on-royal); text-align: center; font-size: 14px; margin-top: 16px; }
.es-auth .es-under a { color: #fff; font-weight: 700; }
@media (min-width: 900px) {
  .es-auth-split { display: grid; grid-template-columns: 1fr 440px; gap: 64px; max-width: 1040px; align-items: center; }
  .es-auth-split .es-auth-pitch { display: block; }
  .es-auth .es-logo-big { margin: 0 0 24px; }
  .es-auth-split h1, .es-auth-split .es-tag { text-align: left; }
}
.es-auth-pitch { display: none; }
.es-auth-pitch h2 { font-size: 34px; line-height: 1.2; margin: 0 0 14px; }
.es-auth-pitch p { color: var(--es-on-royal); font-size: 18px; margin: 0 0 20px; }
.es-auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.es-auth-pitch li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.es-auth-pitch li img { width: 24px; height: 24px; filter: brightness(0) invert(1); }

/* ---------- Signed-in top bar ---------- */
.es-appbar .es-nav a { display: inline-flex; align-items: center; gap: 8px; }
.es-appbar .es-nav img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.es-avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; margin-left: 6px; background: var(--es-blue); color: #fff;
             font: 700 16px var(--es-font); cursor: pointer; flex-shrink: 0; }
.es-avatar:hover { background: #0083B8; }
@media (max-width: 599px) {
  .es-appbar .es-nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .es-appbar .es-nav a { padding: 8px; }
}
@media (min-width: 900px) { .es-hide-lg { display: none !important; } }

/* Page body under the app bar: a light page with the app's cards, wider on desktops */
.es-body { padding-top: 20px; padding-bottom: 40px; }
.es-two-col { display: grid; gap: 20px; }
@media (min-width: 1040px) { .es-two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; } }
.es-empty { text-align: center; padding: 32px 16px; }
.es-empty img { width: 48px; height: 48px; margin-bottom: 8px; }

/* ---------- Sign-up steps and choices ---------- */
.es-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 16px; justify-content: center; }
.es-steps li { display: flex; align-items: center; gap: 6px; color: var(--es-on-royal); font-size: 13px; font-weight: 600; }
.es-steps li + li::before { content: ''; width: 18px; height: 2px; background: rgba(255, 255, 255, .3); margin-right: 2px; }
.es-steps span { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); display: inline-flex;
                 align-items: center; justify-content: center; font-size: 12px; }
.es-steps .is-current { color: #fff; }
.es-steps .is-current span { background: #fff; color: var(--es-royal); border-color: #fff; }
.es-steps .is-done span { background: var(--es-blue); border-color: var(--es-blue); color: #fff; }
@media (min-width: 900px) { .es-auth-split .es-steps { justify-content: flex-start; } }
.es-panel-title { font-size: 20px !important; text-align: left !important; margin: 0 0 14px !important; color: var(--es-ink); }
.es-form-row { display: grid; gap: 0 12px; }
@media (min-width: 480px) { .es-form-row { grid-template-columns: 1fr 1fr; } }
.es-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .es-choice-grid { grid-template-columns: repeat(3, 1fr); } }
.es-choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; cursor: pointer;
             border: 1.5px solid var(--es-line); background: #fff; font: 500 14px var(--es-font); color: var(--es-ink); }
.es-choice:hover { border-color: var(--es-blue); }
.es-choice small { color: var(--es-muted); font-size: 12px; }
.es-choice-flag { font-size: 26px; line-height: 1.2; }
.es-choice.is-selected { border-color: var(--es-royal); background: #F3F3FD; box-shadow: 0 0 0 1px var(--es-royal); }
.es-segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--es-tint); border-radius: 14px; padding: 4px; gap: 4px; }
.es-segment button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; font: 700 15px var(--es-font);
                     color: var(--es-muted); cursor: pointer; }
.es-segment button.is-selected { background: #fff; color: var(--es-royal); box-shadow: 0 1px 4px rgba(18, 22, 63, .12); }

/* Filter chips (form filters) */
.es-chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.es-filter { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid var(--es-line); background: #fff;
             font: 600 14px var(--es-font); color: var(--es-ink); cursor: pointer; }
.es-filter:hover { border-color: var(--es-blue); }
.es-filter.is-selected { background: var(--es-royal); border-color: var(--es-royal); color: #fff; }

/* ---------- Lisa chat: fills the screen under the app bar, composer pinned at the bottom ---------- */
.es-chat { display: flex; flex-direction: column; height: calc(100vh - 60px); height: calc(100dvh - 60px); background: var(--es-tint); }
.es-chat-head { background: #fff; border-bottom: 1px solid var(--es-line); padding: 10px 0; }
.es-chat-messages { flex: 1; overflow-y: auto; }
.es-chat-inner { max-width: 820px; padding-top: 16px; padding-bottom: 16px; display: grid; gap: 12px; }
.es-bubble-row { display: flex; gap: 10px; align-items: flex-end; }
.es-bubble-row.is-user { justify-content: flex-end; }
.es-bubble-avatar { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.es-bubble { background: #fff; border: 1px solid var(--es-line); border-radius: 18px 18px 18px 6px; padding: 10px 14px; max-width: min(640px, 85%); }
.es-bubble .es-lesson p:last-child, .es-bubble .es-lesson ul:last-child, .es-bubble .es-lesson ol:last-child { margin-bottom: 0; }
.es-bubble.is-user { background: var(--es-royal); color: #fff; border-color: var(--es-royal); border-radius: 18px 18px 6px 18px; }
.es-typing { display: flex; gap: 4px; padding: 6px 2px; }
.es-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--es-muted); animation: es-blink 1.2s infinite; }
.es-typing span:nth-child(2) { animation-delay: .2s; } .es-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes es-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.es-chat-composer { background: #fff; border-top: 1px solid var(--es-line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.es-chat-composer .es-wrap { max-width: 820px; }
.es-composer-row { display: flex; gap: 8px; align-items: center; }
.es-composer-row .es-input { flex: 1; min-width: 0; }
.es-icon-btn-dark { color: var(--es-royal); background: var(--es-tint); flex-shrink: 0; }
.es-icon-btn-dark:hover { background: var(--es-blue-soft); }

/* ---------- Payments and tokens ---------- */
.es-step-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--es-royal); color: #fff;
               font-size: 12px; align-items: center; justify-content: center; margin-right: 8px; }
.es-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--es-muted); font-size: 13px; }
.es-or::before, .es-or::after { content: ''; flex: 1; height: 1px; background: var(--es-line); }
/* Google draws its own button inside; this just centres it and keeps the row height steady while it loads */
.es-google { display: flex; justify-content: center; min-height: 44px; }
.es-google-note { display: flex; gap: 10px; align-items: flex-start; background: var(--es-tint); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.es-google-note img { width: 20px; height: 20px; margin-top: 2px; }
.es-google-note p { margin: 0; }
.es-btn-whatsapp { background: #25D366; }
.es-btn-whatsapp:hover { background: #1EB955; }
.es-howto { list-style: none; counter-reset: howto; padding: 0; margin: 0; display: grid; gap: 18px; }
.es-howto li { counter-increment: howto; position: relative; padding-left: 44px; }
.es-howto li::before { content: counter(howto); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
                       background: var(--es-royal); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.es-howto h2 { font-size: 16px; margin: 4px 0 6px; }
.es-howto p { margin: 0 0 10px; color: var(--es-muted); font-size: 14px; }
.es-result-icon { width: 56px; height: 56px; border-radius: 50%; margin: 4px auto 12px; display: flex; align-items: center;
                  justify-content: center; font-size: 28px; font-weight: 700; }
.es-result-icon.is-ok { background: var(--es-success-soft); color: var(--es-success); }
.es-result-icon.is-bad { background: var(--es-danger-soft); color: var(--es-danger); }
.es-toc a.es-card { padding: 14px 16px; border-radius: 16px; }
.es-toc a.es-card-hero, .es-toc a.es-card-hero:hover { color: #fff; background: linear-gradient(135deg, var(--es-royal), var(--es-royal-deep)); }

/* ======================================================================
   Home page: white hero over a dotted map of Africa, About cards,
   a royal Edu Fest band with the mascot, then the footer
   ====================================================================== */
.es-home { background: #fff; }
.es-home .es-wrap { max-width: 1160px; }
.es-home-nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
               border-bottom: 1px solid var(--es-line); }
.es-home-nav .es-wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.es-home-logo img { display: block; height: 24px; width: auto; }
.es-home-links { display: none; gap: 4px; margin-left: 24px; }
.es-home-links a, .es-home-menu a { color: var(--es-ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.es-home-links a:hover { background: var(--es-tint); }
.es-home-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.es-home-signin { color: var(--es-royal); font-weight: 700; text-decoration: none; padding: 8px 10px; display: none; }
.es-page a.es-home-signin { color: var(--es-royal); }
.es-burger { width: 44px; height: 44px; border: 0; background: transparent; display: inline-flex; flex-direction: column;
             justify-content: center; gap: 5px; padding: 0 10px; cursor: pointer; }
.es-burger span { height: 2px; background: var(--es-ink); border-radius: 2px; }
.es-home-menu { display: grid; padding: 4px 16px 12px; border-top: 1px solid var(--es-line); }
@media (min-width: 900px) {
  .es-home-links { display: flex; }
  .es-home-signin { display: inline-block; }
  .es-burger, .es-home-menu { display: none; }
}

/* Hero */
.es-home-hero { position: relative; overflow: hidden; background: #fff url('/images/home/bgpattern.svg') no-repeat center top / 1400px auto; }
.es-home-hero-grid { display: grid; gap: 8px; align-items: end; padding-top: 32px; }
.es-home-hero-text { padding-bottom: 8px; }
.es-home-hero h1 { font-size: 44px; line-height: 1.05; font-weight: 800; color: var(--es-royal-deep); margin: 0 0 16px; letter-spacing: -.5px; }
.es-home-lead { font-size: 17px; color: var(--es-muted); margin: 0 0 22px; max-width: 520px; }
.es-home-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.es-home-buttons .es-btn { min-width: 160px; }
.es-home-soon { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding: 12px 14px; border-radius: 14px;
                background: var(--es-blue-soft); color: var(--es-ink); font-size: 14px; max-width: 520px; }
.es-home-soon img { flex-shrink: 0; margin-top: 1px; }
.es-home-soon-dark { background: rgba(255, 255, 255, .08); color: #fff; }
.es-home-soon-dark img { filter: brightness(0) invert(1); }
.es-home-phone { position: relative; max-width: 420px; width: 100%; margin: 0 auto; }
.es-home-phone-img { display: block; width: 100%; height: auto; }
/* The Edu app icon sits in the middle of the phone screen */
.es-home-appicon { position: absolute; left: 56.4%; top: 48%; width: 27%; aspect-ratio: 1; transform: translate(-50%, -50%);
                   background: #000091; border-radius: 22%; display: flex; align-items: center; justify-content: center;
                   box-shadow: 0 10px 30px rgba(0, 0, 145, .25); }
.es-home-appicon img { width: 100%; height: 100%; }
@media (min-width: 900px) {
  .es-home-hero-grid { grid-template-columns: 1.1fr 1fr; gap: 32px; padding-top: 56px; }
  .es-home-hero-text { padding-bottom: 72px; align-self: center; }
  .es-home-hero h1 { font-size: 72px; }
  .es-home-lead { font-size: 19px; }
  .es-home-phone { max-width: 520px; margin: 0 0 0 auto; }
}

/* About */
.es-home-about { padding: 56px 0; background: var(--es-tint); }
.es-home-h2 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; color: var(--es-royal-deep); font-weight: 800; }
.es-home-intro { font-size: 17px; color: var(--es-muted); margin: 0; max-width: 720px; }
.es-home-about .es-card { border-color: transparent; box-shadow: 0 2px 10px rgba(18, 22, 63, .05); }
.es-home-about .es-card-sub { font-size: 15px; margin-top: 6px; }
@media (min-width: 900px) { .es-home-about { padding: 80px 0; } .es-home-h2 { font-size: 40px; } }

/* Edu Fest */
.es-home-fest { background: #000096; color: #fff; overflow: hidden; }
.es-home-fest-grid { display: grid; gap: 8px; align-items: end; padding-top: 40px; }
.es-home-bear { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; order: 2; }
.es-home-fest-text { order: 1; padding-bottom: 8px; }
.es-home-fest h2 { font-size: 44px; font-weight: 800; line-height: 1.05; margin: 0 0 12px; color: #fff; }
.es-home-fest-lead { color: var(--es-on-royal); font-size: 17px; margin: 0 0 20px; max-width: 520px; }
.es-home-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; max-width: 520px; }
.es-home-facts div { background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 10px 12px; }
.es-home-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #7FD3F2; }
.es-home-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.es-page a.es-btn-on-royal { color: #fff; }
@media (min-width: 900px) {
  .es-home-fest-grid { grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 64px; }
  .es-home-bear { order: 0; max-width: 520px; margin: 0; }
  .es-home-fest-text { padding-bottom: 96px; align-self: center; }
  .es-home-fest h2 { font-size: 72px; }
}

/* Footer joins the Edu Fest band without a gap */
.es-home-footer { margin-top: 0; background: #00006E; border-top: 1px solid rgba(255, 255, 255, .08); }
.es-home-footer li { color: #C7CBE0; }
/* The dotted map sits behind the phone (and the end of the headline on wide screens), never behind the paragraph */
.es-home-hero { background: #fff; }
.es-home-hero::before { content: ''; position: absolute; left: -10%; right: -10%; top: 46%; bottom: 0;
                        background: url('/images/home/bgpattern.svg') no-repeat center top / cover; pointer-events: none; }
.es-home-hero-grid { position: relative; }
.es-home-lead, .es-home-soon, .es-home-buttons { position: relative; }
.es-home-lead { background: rgba(255, 255, 255, .85); border-radius: 8px; }
@media (min-width: 900px) {
  .es-home-hero::before { left: 34%; right: -12%; top: -4%; bottom: -10%; background-size: contain; background-position: center; }
}

/* ---------- Home page, round 2 ---------- */
/* Headings in the logo's navy; the dotted map only behind the phone; a Sign in button you can see */
.es-home-hero h1, .es-home-h2 { color: #001E4F; }
.es-home-hero::before { content: none; }
.es-home-lead { background: none; }
.es-home-phone::before { content: ''; position: absolute; left: -22%; right: -22%; top: -6%; bottom: 0;
                         background: url('/images/home/bgpattern.svg') no-repeat center / cover; z-index: 0; pointer-events: none; }
.es-home-phone-img, .es-home-appicon { position: relative; z-index: 1; }
.es-home-appicon { position: absolute; }
.es-btn-line { background: #fff; color: var(--es-royal); border: 2px solid var(--es-royal); }
.es-page a.es-btn-line { color: var(--es-royal); }
.es-btn-line:hover { background: var(--es-blue-soft); }

/* About us: royal band with the campus student */
.es-home-about2 { background: #000096; color: #fff; overflow: hidden; }
.es-home-about2-grid { display: grid; gap: 8px; padding-top: 48px; }
.es-home-about2-photo { order: 2; align-self: end; }
.es-home-about2-photo img { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.es-home-about2-text { order: 1; }
.es-home-about2 h2 { font-size: 36px; line-height: 1.1; font-weight: 800; margin: 0 0 14px; color: #fff; }
.es-home-about2-lead { color: var(--es-on-royal); font-size: 17px; margin: 0 0 18px; max-width: 600px; }
.es-home-about2-lead b { color: #7FD3F2; }
.es-home-ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; max-width: 600px; }
.es-home-ticks li { position: relative; padding-left: 30px; color: var(--es-on-royal); }
.es-home-ticks li b { color: #fff; }
.es-home-ticks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
                            background: var(--es-blue); color: #fff; font-size: 12px; font-weight: 700; display: flex;
                            align-items: center; justify-content: center; }
.es-home-campuses { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.es-home-campus { display: inline-flex; flex-direction: column; padding: 8px 12px; border-radius: 12px;
                  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); font-size: 13px; color: var(--es-on-royal); }
.es-home-campus b { color: #fff; font-size: 15px; }
.es-home-campus small { color: #9AA5E6; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.es-home-campus.is-open { background: var(--es-blue); border-color: var(--es-blue); color: #fff; }
.es-home-campus.is-open small { color: #fff; }
.es-home-interest { background: #fff; color: var(--es-ink); border-radius: 18px; padding: 16px; max-width: 600px; margin-bottom: 8px; }
.es-home-interest label { display: block; font-weight: 700; margin-bottom: 8px; }
.es-home-interest-row { display: grid; gap: 10px; }
.es-home-interest p { margin: 10px 0 0; font-size: 14px; color: var(--es-muted); }
@media (min-width: 560px) { .es-home-interest-row { grid-template-columns: 1fr auto; } }
@media (min-width: 900px) {
  .es-home-about2-grid { grid-template-columns: 0.9fr 1.1fr; gap: 48px; padding-top: 72px; }
  .es-home-about2-photo { order: 0; }
  .es-home-about2-photo img { max-width: 520px; margin: 0; }
  .es-home-about2-text { padding-bottom: 72px; align-self: center; }
  .es-home-about2 h2 { font-size: 52px; }
}

/* Schools */
.es-home-schools { padding: 56px 0; background: #fff; }
.es-home-schools-grid { display: grid; gap: 28px; align-items: center; }
.es-home-cards { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; border-radius: 20px; }
@media (min-width: 900px) { .es-home-schools { padding: 80px 0; } .es-home-schools-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* ---------- Home page, round 3: the hero always fits on one screen ---------- */
/* Heading grows with the screen but never past what fits; the phone is capped by the screen height */
.es-home-hero h1 { font-size: clamp(34px, 5.2vw, 64px); }
.es-home-lead { font-size: clamp(16px, 1.4vw, 18px); }
@media (min-width: 900px) {
  .es-home-hero-grid { padding-top: clamp(24px, 4vh, 48px); }
  .es-home-hero-text { padding-bottom: clamp(24px, 6vh, 64px); }
  .es-home-phone { width: min(100%, 600px, calc((100vh - 64px - 56px) * 720 / 637)); max-width: none; }
  .es-home-hero-grid { align-items: end; }
}
@media (min-width: 900px) and (max-height: 700px) { .es-home-soon { display: none; } }
/* ID card image sits on white with its own shadow, so no rounded corners */
.es-home-cards { border-radius: 0; max-width: 460px; }

/* ---------- Home page, round 4: phones ---------- */
/* The nav bar keeps just the logo and menu on phones; Get started lives in the menu and the hero */
@media (max-width: 899px) { .es-home-getstarted { display: none; } }
.es-home-menu a.es-home-menu-cta { background: var(--es-royal); color: #fff; text-align: center; margin-top: 6px; }
/* The two hero buttons share one row on phones to save height */
.es-home-buttons-pair { flex-wrap: nowrap; }
.es-home-buttons-pair .es-btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
@media (min-width: 560px) { .es-home-buttons-pair .es-btn { flex: 0 0 auto; min-width: 160px; padding: 0 22px; } }
@media (max-width: 599px) {
  .es-home-hero-grid { padding-top: 20px; }
  .es-home-lead { margin-bottom: 16px; }
  .es-home-soon { margin-top: 14px; }
}

/* Choose your subjects: cards you tap to add or remove, like the app */
button.es-subject { width: 100%; text-align: left; font: inherit; color: inherit; }
.es-subject.is-chosen { border-color: var(--es-royal); box-shadow: 0 0 0 1px var(--es-royal); background: #F7F7FE; }
