/* One global navigation; essay-specific steps belong to the essay, not here. */
body.ep-top-navigation { --ep-sidebar-offset: 0px; --ep-workspace-header-height: 48px; --ep-workspace-header-background: linear-gradient(90deg, #2b2d66 0%, #3f48a6 30%, #7a5cc0 58%, #bb86b8 80%, #e4a08a 100%); }
body.ep-top-navigation .migration-header {
  height: var(--ep-workspace-header-height); padding: 0 max(24px, calc((100% - 1120px) / 2)); gap: 24px;
  /* The original brand palette with a centered row of navigation and tools. */
  background: var(--ep-workspace-header-background); color: #fff; border-bottom: 0; box-shadow: inset 0 -1px 0 #28295038;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.ep-top-navigation .ep-workspace-brand { justify-content: center; flex: 0 0 32px; min-height: 40px; padding: 0; color: #fff; text-decoration: none; }
.ep-top-navigation .ep-workspace-brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.ep-top-navigation .ep-workspace-brand .ep-workspace-brand__mark { width: 28px; height: 28px; border: 0; border-radius: 0; background: transparent; color: inherit; box-shadow: none; }
.ep-top-navigation .ep-workspace-brand .ep-workspace-brand__mark svg { width: 26px; height: 26px; }
.ep-top-navigation #desktop-nav { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin: 0; }
.ep-top-navigation #desktop-nav > a { justify-content: center; min-height: 36px; padding: 7px 6px; border-radius: 6px; color: #d7dbeb; border-color: transparent; background: transparent; box-shadow: none; font-size: 13px; line-height: 20px; white-space: nowrap; }
/* Navigation stays text-only, including hover/press; override the older sidebar
   state rules without changing the responsive link hit areas. */
body.ep-top-navigation #desktop-nav > a:is(:hover, :active, [aria-current="page"]) {
  color: #fff; border-color: transparent; background: transparent; box-shadow: none;
}
.ep-top-navigation #desktop-nav > a[aria-current="page"] { font-weight: 700; }
.ep-top-navigation #desktop-nav > a[aria-current="page"]::before { content: none; }
body.ep-top-navigation #desktop-nav > a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ep-top-navigation .ep-workspace-menu-tools { display: none; }
.ep-top-navigation #workspace-menu-toggle { display: none; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.ep-top-navigation #workspace-menu-toggle svg { width: 20px; height: 20px; }
.ep-top-navigation #workspace-menu-toggle:hover { background: #ffffff20; }
.ep-top-navigation .ep-global-lookup { position: relative; left: auto; transform: none; width: auto; flex: 0 1 240px; min-width: 160px; max-width: 240px; margin: 0; }
.ep-top-navigation #workspace-my { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 36px; padding: 7px 8px; border-radius: 6px; color: #fff; font-size: 13px; line-height: 20px; text-decoration: none; white-space: nowrap; }
.ep-top-navigation #workspace-my:hover { background: #ffffff16; }
.ep-top-navigation #workspace-my[aria-current="page"] { font-weight: 700; background: #ffffff20; }
.ep-top-navigation #workspace-my:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ep-top-navigation .ep-global-lookup form { height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; border-color: #dce3ef; border-radius: 6px; background: #fbfcff; }
.ep-top-navigation .ep-global-lookup form > svg { color: #657895; }
.ep-top-navigation .ep-global-lookup input::placeholder { color: #65738a; }
.ep-top-navigation .ep-global-lookup form button[type="submit"] { background: #e6edf7; color: #3f587b; }
/* Legacy account panel is kept hidden by the current shell. */
.ep-workspace-account { position: relative; flex: 0 0 auto; margin-left: auto; color: #fff; }
.ep-workspace-account > summary { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 8px; border: 1px solid #ffffff66; border-radius: 9px; background: #14132f70; list-style: none; font-size: 12px; cursor: pointer; user-select: none; }
.ep-workspace-account > summary::-webkit-details-marker { display: none; }
.ep-workspace-account > summary > svg { width: 18px; height: 18px; }
.ep-workspace-account[open] > summary, .ep-workspace-account > summary:hover { background: #14132f80; border-color: #ffffff88; }
.ep-workspace-account > summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ep-workspace-account__panel { position: absolute; right: 0; top: calc(100% + 10px); width: 268px; max-height: calc(100dvh - 82px); overflow-y: auto; padding: 17px; border: 1px solid #c5d2e3; border-radius: 15px; background: #fbfcff; color: #526b8d; box-shadow: 0 14px 40px #253e6124; }
.ep-workspace-account__panel .ep-sidebar-quota { display: grid; gap: 7px; padding: 0 0 14px; background: none; border: 0; }
.ep-workspace-account__panel .ep-sidebar-quota > strong { font-size: 12px; color: #536783; }
.ep-workspace-account__panel .ep-sidebar-quota p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; color: #73849c; font-size: 12px; }
.ep-workspace-account__panel .ep-sidebar-quota b { color: #405776; font-weight: 600; font-variant-numeric: tabular-nums; }
.ep-workspace-account__panel :is(.ep-sidebar-account-action, .ep-sidebar-identity) { padding: 12px 0; }
.ep-workspace-account__panel :is(.ep-sidebar-account-action, .ep-sidebar-identity) small { display: block; margin-top: 3px; color: #8190a6; font-size: 10px; }
.ep-workspace-account__panel .ep-sidebar-purchase { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 36px; margin-top: 4px; padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.ep-workspace-account__panel .ep-source-notice { display: block; margin-top: 12px; text-align: center; }
body.ep-top-navigation .migration-main { margin-left: 0 !important; padding-top: var(--ep-workspace-header-height); }
body.ep-top-navigation .migration-main .block-container { padding-left: clamp(20px, 4vw, 60px); padding-right: clamp(20px, 4vw, 60px); }
/* Text-heavy essay pages retain a comfortable centered working width on large displays. */
body.ep-top-navigation .migration-main:has(:is(.migration-write-page, .migration-report-page, .migration-training-page)) .block-container { width: min(100%, 1240px); max-width: 1240px; margin-inline: auto; padding-top: 18px; padding-bottom: 24px; box-sizing: border-box; }
body.ep-top-navigation .migration-app .ep-home-atmosphere,
body.ep-top-navigation .migration-app .migration-main::after { left: 0 !important; }
body.ep-top-navigation .migration-main:has(.migration-arsenal-page) .ep-home-atmosphere { left: 0 !important; }
body.ep-top-navigation :is(#desktop-account, #mobile-account) { display: none !important; }
body.ep-top-navigation.ep-exam-active #desktop-nav { visibility: hidden; pointer-events: none; }
@media (min-width: 601px) and (not ((pointer: coarse) and (max-width: 1000px) and (max-height: 500px))) {
  .ep-top-navigation .ep-global-lookup .ep-lookup-panel { left: auto; right: 0; transform: none; }
}
@media (min-width: 1001px) and (max-width: 1200px) {
  body.ep-top-navigation .migration-header { gap: 16px; }
  .ep-top-navigation #desktop-nav { gap: 6px; }
  .ep-top-navigation #desktop-nav > a { padding-inline: 5px; font-size: 12px; }
  .ep-top-navigation .ep-global-lookup { flex-basis: 220px; }
}
@media (max-width: 1000px) {
  body.ep-top-navigation .migration-header { gap: 9px; padding: 0 14px; }
  .ep-top-navigation #workspace-menu-toggle { display: grid; order: 5; }
  .ep-top-navigation #desktop-nav { display: none; position: absolute; top: calc(var(--ep-workspace-header-height) + 8px); left: 14px; right: 14px; padding: 9px; border: 1px solid #ffffff66; border-radius: 14px; background: var(--ep-workspace-header-background); box-shadow: 0 14px 40px #253e6124; }
  .ep-top-navigation.ep-workspace-menu-open #desktop-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .ep-top-navigation #desktop-nav > a { min-height: 42px; padding: 8px 5px; }
  .ep-top-navigation .ep-workspace-menu-tools { display: flex; justify-content: flex-end; grid-column: 1 / -1; gap: 16px; margin-top: 4px; padding: 10px 6px 2px; border-top: 1px solid #ffffff55; }
  .ep-top-navigation .ep-workspace-menu-tools a { min-height: 30px; padding: 5px 0; border: 0; border-radius: 0; color: #fff; font-size: 11px; }
  .ep-top-navigation .ep-global-lookup { position: relative; left: auto; transform: none; width: auto; flex: 1 1 200px; max-width: 470px; margin-left: auto; }
  .ep-workspace-account > summary { width: 36px; padding: 7px; justify-content: center; }
  .ep-workspace-account > summary > span { display: none; }
  .ep-workspace-account__panel { right: -45px; }
  body.ep-top-navigation .migration-main .block-container { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 600px), (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) {
  .ep-top-navigation #workspace-my { padding-inline: 7px; font-size: 12px; }
  body.ep-top-navigation .migration-header { gap: 5px; padding: 0 10px; }
  .ep-top-navigation .ep-global-lookup { min-width: 0; flex-basis: 140px; }
  .ep-top-navigation .ep-global-lookup form { gap: 4px; padding-left: 7px; padding-right: 4px; }
  .ep-top-navigation .ep-global-lookup form > svg { display: none; }
  .ep-top-navigation .ep-global-lookup form button[type="submit"] { padding: 4px; }
  .ep-top-navigation .ep-lookup-panel { top: calc(var(--ep-workspace-header-height) + 6px); }
  .ep-top-navigation #desktop-nav { left: 10px; right: 10px; }
  .ep-top-navigation #desktop-nav > a { font-size: 12px; }
  body.ep-top-navigation .migration-main .block-container { padding-left: 14px; padding-right: 14px; }
}
@media print {
  body.ep-top-navigation .migration-header { display: none !important; }
  body.ep-top-navigation .migration-main { margin-left: 0 !important; padding-top: 0; }
}

/* Mobile learning home. The desktop home and original work pages stay intact. */
.ep-mobile-nav, .ep-mobile-home, .ep-mobile-profile-bar { display: none; }
/* Browser tabs already keep the page inside their system chrome. */
:root { --ep-phone-safe-top: 0px; --ep-phone-safe-bottom: 0px; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  :root { --ep-phone-safe-top: env(safe-area-inset-top, 0px); --ep-phone-safe-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 600px), (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) {
  body.ep-top-navigation.ep-mobile-shell {
    --ep-workspace-header-height: 0px;
    --ep-mobile-nav-height: calc(52px + var(--ep-phone-safe-bottom));
    --ep-mobile-top-light: linear-gradient(to bottom, #e7edf9db, #f0f4fbbf 58%, #f7f9fd80);
  }
  body.ep-mobile-shell,
  body.ep-mobile-shell :is(a, button, summary, label, [role="button"], [role="tab"]) {
    -webkit-tap-highlight-color: rgba(48, 50, 54, .16);
  }
  body.ep-mobile-shell :is(nav a, [role="tab"], button) { -webkit-user-select: none; user-select: none; }
  body.ep-top-navigation.ep-mobile-shell > .migration-app > .migration-header { display: none; }
  body.ep-top-navigation.ep-mobile-shell .migration-main { padding-bottom: var(--ep-mobile-nav-height); }
  body.ep-top-navigation.ep-mobile-shell .migration-main:has([data-lark-split]) { padding-bottom: var(--ep-mobile-nav-height); }
  body.ep-mobile-shell .ep-mobile-nav {
    position: fixed; z-index: 900; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    height: var(--ep-mobile-nav-height); box-sizing: border-box; padding: 4px 8px calc(4px + var(--ep-phone-safe-bottom));
    background: #fff; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.ep-mobile-shell .ep-mobile-nav a {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; width: 56px; max-width: 100%; justify-self: center;
    border: 1px solid transparent; border-radius: 16px; background: transparent; color: #8b8d93; box-shadow: none; text-decoration: none;
  }
  body.ep-mobile-shell .ep-mobile-nav a svg { width: 26px; height: 26px; stroke-width: 1.65; }
  body.ep-mobile-shell .ep-mobile-nav .ep-nav-solid { display: none; }
  body.ep-mobile-shell .ep-mobile-nav a[aria-current="page"] { color: #171717; background: transparent; }
  body.ep-mobile-shell .ep-mobile-nav a[aria-current="page"] .ep-nav-solid { display: block; }
  body.ep-mobile-shell .ep-mobile-nav a[aria-current="page"] .ep-nav-line { display: none; }
  body.ep-mobile-shell .ep-mobile-nav a:focus-visible { outline: 2px solid #424853; outline-offset: -2px; }
  body.ep-mobile-shell #workspace-my { display: none; }
  body.ep-mobile-shell .migration-header > .ep-assistant-launcher { display: none; }
  body.ep-mobile-shell #desktop-nav > a[data-nav-section="home"],
  body.ep-mobile-shell #desktop-nav > a[data-nav-section="writing"],
  body.ep-mobile-shell #desktop-nav > a[data-nav-section="assistants"],
  body.ep-mobile-shell #desktop-nav > a[data-nav-section="wordbook"] { display: none; }
  body.ep-mobile-shell #workspace-menu-toggle { width: 44px; height: 44px; }
  body.ep-mobile-shell #home-content.has-mobile-home > :not(.ep-mobile-home) { display: none !important; }
  body.ep-mobile-shell:has(.ep-mobile-home) .ep-home-reading-progress { display: none; }
  body.ep-mobile-shell .migration-main:has(.ep-mobile-home) .ep-home-atmosphere { display: none; }
  body.ep-top-navigation.ep-mobile-shell:has(.ep-mobile-home) {
    --ep-page-wash: #fff;
    --mh-view-height: var(--ep-phone-view-height, 100dvh);
    background: #fff;
  }
  body.ep-top-navigation.ep-mobile-shell :is(.migration-app, .migration-main):has(.ep-mobile-home) {
    min-height: var(--mh-view-height);
  }
  body.ep-top-navigation.ep-mobile-shell .migration-main:has(.ep-mobile-home) .block-container { padding: 0 20px; }
  body.ep-top-navigation.ep-mobile-shell .migration-main:has(.ep-mobile-home) {
    --ep-page-wash:
      radial-gradient(260px 200px at 8% 6%, #d7e0fb, transparent 70%) 0 0 / 100% 380px no-repeat,
      radial-gradient(240px 180px at 96% 0%, #f9e4d3, transparent 70%) 0 0 / 100% 380px no-repeat,
      radial-gradient(260px 220px at 70% 40%, #d9efe9, transparent 72%) 0 0 / 100% 380px no-repeat #fff;
  }
  body.ep-mobile-shell:has(.ep-mobile-home) .ep-mobile-nav {
    bottom: max(0px, calc(100dvh - var(--mh-view-height) - var(--ep-phone-view-top, 0px)));
  }
  body.ep-mobile-shell .ep-mobile-home {
    --mh-gutter: 20px;
    --mh-ink: #171b26;
    --mh-muted: #555f73;
    display: flex; flex-direction: column; padding-block-end: 12px; color: var(--mh-ink);
  }
  .ep-mobile-home, .ep-mobile-home * { box-sizing: border-box; }
  .ep-mobile-home > * { flex-shrink: 0; min-width: 0; }
  .ep-mobile-home :is(h1, h2, p) { margin: 0; }
  .ep-mobile-home .ep-mh-arrow { flex: none; width: 17px; height: 17px; }
  .ep-mobile-home .ep-mh-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
  .ep-mobile-home :is(a, button, summary):focus-visible { outline: 2px solid #465f99; outline-offset: 3px; }
  .ep-mobile-home .ep-mh-first { display: flex; flex-direction: column; width: 100%; padding-block-start: 14px; }
  .ep-mobile-home .ep-mh-greeting { padding-inline: 4px; }
  .ep-mobile-home .ep-mh-greeting h1 {
    color: var(--mh-ink); font-size: 1.625rem; font-weight: 800; line-height: 1.18; letter-spacing: -.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ep-mobile-home .ep-mh-lark-line { display: flex; align-items: flex-start; gap: 10px; margin-block-start: 10px; }
  .ep-mobile-home .ep-mh-lark-line img {
    flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
    background: #e8eeff; box-shadow: 0 2px 6px #5064aa33;
  }
  .ep-mobile-home .ep-mh-lark-line p {
    min-width: 0; padding: 8px 12px; border: 1px solid #e6e9f2; border-radius: 4px 16px 16px 16px;
    background: #ffffffb3; color: #465168; font-size: .875rem; line-height: 1.43; overflow-wrap: anywhere;
  }
  .ep-mobile-home .ep-mh-sheet-wrap { position: relative; margin-block-start: 18px; }
  .ep-mobile-home .ep-mh-sheet {
    position: relative; isolation: isolate; min-width: 0; padding: 12px 24px 32px 40px;
    border-radius: 10px 26px 10px 10px;
  }
  .ep-mobile-home .ep-mh-sheet::before {
    content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none; transform: rotate(-1.4deg);
    background:
      linear-gradient(225deg, #e9ecf3 50%, transparent 50%) right top / 34px 34px no-repeat,
      linear-gradient(#f2b8b0, #f2b8b0) 28px 0 / 1px 100% no-repeat,
      repeating-linear-gradient(transparent 0 29px, #e7ebf5 29px 30px) 0 25px / 100% 100% no-repeat #fffefb;
    box-shadow: inset 0 1px 0 #fff, 0 12px 28px #28325a21, 0 2px 5px #28325a15;
  }
  .ep-mobile-home .ep-mh-sheet-hit {
    position: absolute; z-index: 1; inset: 0; display: block; width: 100%; min-height: 44px;
    padding: 0; border: 0; border-radius: inherit; background: transparent; box-shadow: none; cursor: pointer;
  }
  .ep-mobile-home .ep-mh-sheet-tag {
    display: block; color: #59647a; font-size: .75rem; font-weight: 700;
    letter-spacing: .055em; line-height: 30px; text-transform: uppercase;
  }
  .ep-mobile-home .ep-mh-sheet-title {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; color: var(--mh-ink);
    font: 600 1.0625rem / 30px Georgia, 'Songti SC', SimSun, serif;
  }
  .ep-mobile-home .ep-mh-sheet-prompt {
    min-width: 0; color: #626d80; font: 400 1rem / 30px Georgia, 'Songti SC', SimSun, serif;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ep-mobile-home .ep-mh-caret {
    display: inline-block; width: 2px; height: 1em; margin-inline-start: 4px; vertical-align: -.13em; background: #4b60c5;
  }
  .ep-mobile-home .ep-mh-sheet:has(.ep-mh-sheet-note) { padding-block-end: 48px; }
  .ep-mobile-home .ep-mh-sheet-note {
    position: absolute; inset: auto 24px 21px auto; transform: rotate(-6deg);
    color: #a13f36; font: 600 .9375rem / 1.4 'Kaiti SC', KaiTi, 'Segoe Script', cursive;
    text-decoration: underline wavy; text-underline-offset: 4px; pointer-events: none;
  }
  .ep-mobile-home .ep-mh-cta { position: relative; z-index: 2; margin: -16px 18px 0; }
  .ep-mobile-home .ep-mh-cta .ep-mh-primary {
    display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 54px;
    padding: 8px 16px; border: 0; border-radius: 18px 18px 22px 22px; text-align: center;
    background: linear-gradient(180deg, #34406a, #222b4a); color: #fff;
    box-shadow: 0 10px 22px #222b4a4d, inset 0 1px #ffffff40;
    font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer;
  }
  .ep-mobile-home .ep-mh-cta .ep-mh-primary:active { background: #293555; }
  .ep-mobile-home :is(.ep-mh-pills, .ep-mh-rail) {
    display: flex; max-width: calc(100% + 2 * var(--mh-gutter)); margin-inline: calc(-1 * var(--mh-gutter));
    padding-inline: var(--mh-gutter); overflow-x: auto; scrollbar-width: none;
  }
  .ep-mobile-home :is(.ep-mh-pills, .ep-mh-rail)::-webkit-scrollbar { display: none; }
  .ep-mobile-home .ep-mh-pills { gap: 8px; padding-block: 5px; margin-block-start: 8px; }
  .ep-mobile-home .ep-mh-pill {
    display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 14px;
    border: 1px solid #e3e6ee; border-radius: 999px; background: #fff; color: #3b4254;
    font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  }
  .ep-mobile-home .ep-mh-pill svg { width: 16px; height: 16px; flex: none; }
  .ep-mobile-home .ep-mh-rail-body { min-width: 0; margin-block-start: 18px; }
  .ep-mobile-home .ep-mh-rail-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 8px; }
  .ep-mobile-home .ep-mh-rail-title h2 { color: var(--mh-ink); font-size: 1rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
  .ep-mobile-home .ep-mh-rail-title span { color: var(--mh-muted); font-size: .8125rem; }
  .ep-mobile-home .ep-mh-rail { gap: 12px; padding-block: 5px; scroll-snap-type: x mandatory; scroll-padding-left: var(--mh-gutter); }
  .ep-mobile-home .ep-mh-card {
    --mh-card-wash: linear-gradient(160deg, #2b3558, #1a2038);
    --mh-card-arrow: #ffffff29;
    position: relative; display: flex; flex: 0 0 200px; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 0;
    min-height: 150px; min-width: 0; padding: 14px; border: 0; border-radius: 22px;
    background: var(--mh-card-wash); color: #fff; text-align: left; font: inherit; text-decoration: none;
    cursor: pointer; scroll-snap-align: start;
  }
  .ep-mobile-home .ep-mh-card:nth-child(3n + 2) {
    --mh-card-wash: linear-gradient(160deg, #dbe8ff, #f4f8ff); --mh-card-arrow: #fff; color: #1f2a4d;
  }
  .ep-mobile-home .ep-mh-card:nth-child(3n + 3) {
    --mh-card-wash: linear-gradient(200deg, #f6d9c2, #e3b49a 55%, #c59b89); --mh-card-arrow: #ffffff8c; color: #2a1a14;
  }
  .ep-mobile-home .ep-mh-card.ep-mh-card--photo {
    --mh-card-arrow: #fff;
    isolation: isolate;
    color: #fff;
  }
  .ep-mobile-home .ep-mh-card--photo > .ep-learning-photo,
  .ep-mobile-home .ep-mh-card--photo::before {
    position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; pointer-events: none;
  }
  .ep-mobile-home .ep-mh-card--photo > .ep-learning-photo { z-index: -2; object-fit: cover; }
  .ep-mobile-home .ep-mh-card--photo::before {
    content: ''; z-index: -1;
    background: linear-gradient(180deg, #111b2810 15%, #101827a6 50%, #0f1529e6);
  }
  .ep-mobile-home .ep-mh-card--photo .ep-mh-card-arrow { color: #1f2a4d; }
  .ep-mobile-home .ep-mh-card strong, .ep-mobile-home .ep-mh-card small {
    display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  }
  .ep-mobile-home .ep-mh-card small { -webkit-line-clamp: 1; font-size: .75rem; font-weight: 650; line-height: 1.4; margin-block-end: 4px; }
  .ep-mobile-home .ep-mh-card strong { -webkit-line-clamp: 2; font-size: .9375rem; font-weight: 800; line-height: 1.3; }
  .ep-mobile-home .ep-mh-card-arrow {
    position: absolute; inset: 16px 16px auto auto; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 50%; background: var(--mh-card-arrow);
  }
  .ep-mobile-home .ep-mh-ring {
    position: absolute; inset: 12px auto auto 14px; isolation: isolate; display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 50%; color: #263e72; font-size: .625rem; font-weight: 800;
    background: conic-gradient(#5b6fe0 0 var(--ep-mh-progress, 0%), #fff var(--ep-mh-progress, 0%) 100%);
  }
  .ep-mobile-home .ep-mh-ring::before { content: ''; position: absolute; z-index: -1; inset: 4px; border-radius: 50%; background: #edf4ff; }
  .ep-mobile-home .ep-mh-error { font-size: 13px; color: var(--mh-muted); }
  .ep-mobile-home .ep-mh-error button { min-height: 44px; padding-inline: 8px; border: 0; background: transparent; color: #465f86; font: inherit; cursor: pointer; }
  body.ep-mobile-shell.ep-mobile-keyboard { --ep-mobile-nav-height: 0px; }
  body.ep-mobile-shell:is(.ep-mobile-keyboard, .ep-exam-active) .ep-mobile-nav { display: none; }
  body.ep-mobile-shell[data-report-paper-open] .ep-mobile-nav { display: none; }
}
@media (max-width: 600px) and (max-height: 700px), (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) and (max-height: 700px) {
  body.ep-mobile-shell .ep-mobile-home { padding-block-end: 8px; }
  .ep-mobile-home .ep-mh-first { padding-block-start: 9px; }
  .ep-mobile-home .ep-mh-greeting h1 { font-size: 1.375rem; }
  .ep-mobile-home .ep-mh-lark-line { gap: 8px; margin-block-start: 6px; }
  .ep-mobile-home .ep-mh-lark-line p { padding: 5px 8px; font-size: .8125rem; }
  .ep-mobile-home .ep-mh-sheet-wrap { margin-block-start: 12px; }
  .ep-mobile-home .ep-mh-sheet { padding-block: 8px 25px; }
  .ep-mobile-home .ep-mh-sheet:has(.ep-mh-sheet-note) { padding-block-end: 42px; }
  .ep-mobile-home .ep-mh-sheet-note { inset-block-end: 17px; font-size: .8125rem; }
  .ep-mobile-home .ep-mh-cta .ep-mh-primary { min-height: 46px; border-radius: 14px 14px 18px 18px; }
  .ep-mobile-home .ep-mh-first:has(.ep-mh-pills) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
  .ep-mobile-home .ep-mh-first > * { grid-column: 1 / -1; }
  .ep-mobile-home .ep-mh-first:has(.ep-mh-pills) .ep-mh-cta { grid-column: 1; margin-inline: 4px 0; }
  .ep-mobile-home .ep-mh-pills { position: relative; z-index: 2; grid-column: 2; align-self: start; margin: -16px 4px 0 0; padding: 0; }
  .ep-mobile-home .ep-mh-secondary { min-height: 46px; }
  .ep-mobile-home .ep-mh-rail-body { margin-block-start: 11px; }
  .ep-mobile-home .ep-mh-card { min-height: 104px; padding: 12px; }
  .ep-mobile-home .ep-mh-card-arrow { inset: 10px 12px auto auto; width: 28px; height: 28px; }
  .ep-mobile-home .ep-mh-ring { inset: 9px auto auto 12px; width: 36px; height: 36px; }
  .ep-mobile-home .ep-mh-error button { display: inline-flex; align-items: center; }
}
@media (max-width: 600px) and (max-height: 620px), (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) and (max-height: 620px) {
  .ep-mobile-home .ep-mh-sheet-prompt { display: none; }
}
@media print { .ep-mobile-nav, .ep-mobile-home { display: none !important; } }

@media screen and (max-width: 600px) and (orientation: portrait) {
  .ep-mobile-home .ep-mh-first:has(.ep-mh-rail) { flex-grow: 1; }
  .ep-mh-first:has(.ep-mh-rail) .ep-mh-sheet-wrap { display: flex; flex-grow: .75; }
  .ep-mh-first:has(.ep-mh-rail) .ep-mh-sheet {
    display: flex; flex-direction: column; justify-content: center; width: 100%;
  }
  .ep-mobile-home .ep-mh-rail-body { display: flex; flex-direction: column; flex-grow: 1; }
  .ep-mobile-home .ep-mh-rail { flex-grow: 1; }
}

@media screen and (max-width: 600px) and (max-height: 700px) and (orientation: portrait) {
  .ep-mobile-home .ep-mh-first:has(.ep-mh-pills) {
    grid-template-rows: auto minmax(min-content, .75fr) auto auto minmax(min-content, 1fr);
  }
  .ep-mobile-home .ep-mh-first:has(.ep-mh-pills) .ep-mh-rail-body { grid-row: 5; }
}

@media screen and (pointer: coarse) and (orientation: landscape) and (min-width: 480px) and (max-width: 1000px) and (max-height: 500px) {
  .ep-mobile-home .ep-mh-first:has(.ep-mh-rail) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 10px;
  }
  .ep-mh-first:has(.ep-mh-rail) .ep-mh-greeting {
    grid-area: 1 / 1 / 2 / -1; display: flex; align-items: center; gap: 12px;
  }
  .ep-mobile-home .ep-mh-greeting:has(.ep-mh-lark-line) h1 { flex-shrink: 0; max-width: 45%; }
  .ep-mobile-home .ep-mh-lark-line { margin: 0; align-items: center; }
  .ep-mobile-home .ep-mh-sheet-wrap { grid-area: 2 / 1 / 3 / 3; margin-block-start: 5px; }
  .ep-mobile-home .ep-mh-sheet { padding-block: 5px 22px; }
  .ep-mobile-home .ep-mh-sheet-tag { line-height: 20px; }
  .ep-mobile-home .ep-mh-sheet-title { line-height: 24px; }
  .ep-mobile-home .ep-mh-cta { grid-area: 3 / 1 / 4 / 3; }
  .ep-mobile-home .ep-mh-first:has(.ep-mh-pills) .ep-mh-cta { grid-column: 1; }
  .ep-mobile-home .ep-mh-pills { grid-area: 3 / 2 / 4 / 3; }
  .ep-mobile-home .ep-mh-rail-body { grid-area: 2 / 3 / 4 / 4; margin: 0; }
  .ep-mobile-home .ep-mh-rail { width: 100%; margin: 0; padding: 3px; scroll-padding-inline: 3px; }
  .ep-mobile-home .ep-mh-card { flex-basis: min(85%, 180px); }
}

@media screen and (max-width: 600px), screen and (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) {
  body.ep-mobile-shell:has(.ep-mobile-home) { --ep-home-bar: calc(48px + var(--ep-phone-safe-top)); }
  body.ep-mobile-shell .ep-mobile-profile-bar:not([hidden]) {
    --bar-inset: 20px;
    position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    height: var(--ep-home-bar); box-sizing: border-box; margin-inline: calc(-1 * var(--bar-inset));
    padding: var(--ep-phone-safe-top) max(var(--bar-inset), env(safe-area-inset-right, 0px)) 0 max(var(--bar-inset), env(safe-area-inset-left, 0px));
    background: var(--ep-mobile-top-light), #fff;
  }
  body.ep-mobile-shell:has(.ep-mobile-home) .ep-mobile-profile-bar:not([hidden]) { background: transparent; }
  .ep-mobile-profile-bar button, .ep-my-drawer-head button {
    display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: none; color: #202630; cursor: pointer;
  }
  .ep-mobile-profile-bar button { margin-left: -5px; justify-self: start; }
  .ep-mobile-profile-bar .ep-my-avatar { width: 35px; height: 35px; }
  .ep-home-brand-mark { display: block; width: 29px; height: 29px; filter: grayscale(1) invert(1) contrast(1.35); }
  .ep-home-upgrade { display: inline-flex; align-items: center; justify-self: end; gap: 5px; padding: 4px 10px 5px 7px;
    border-radius: 18px; background: #f3f5f7c7; color: #253039; font: 560 .875rem/1.25 system-ui, sans-serif; white-space: nowrap; }
  .ep-home-upgrade svg { width: 16px; height: 16px; color: #3786ba; }
  .ep-my-avatar {
    display: inline-grid; place-items: center; width: 33px; height: 33px; border-radius: 50%;
    background: linear-gradient(150deg,#eaf0fb 0%,#c4d4eb 70%,#afc4e1 100%); color: #304b71;
    font: 600 1.04rem/1 system-ui, sans-serif;
  }
  .ep-my-avatar svg { width: 57%; height: 57%; }
  .ep-my-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
  .ep-my-drawer-head .ep-my-edit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #435875; font-weight: 600; text-decoration: none; }
  body.ep-mobile-shell .ep-mobile-home {
    min-height: calc(var(--mh-view-height) - var(--ep-mobile-nav-height) - var(--ep-home-bar));
  }
  html:has(.ep-mobile-account-drawer[open]) { overflow: hidden; }
  dialog.ep-mobile-account-drawer {
    position: fixed; inset: 0; width: 100%; max-width: none;
    height: 100dvh; max-height: 100dvh; box-sizing: border-box; margin: 0;
    padding: calc(var(--ep-phone-safe-top) + 24px) calc(env(safe-area-inset-right, 0px) + 24px)
      calc(var(--ep-phone-safe-bottom) + 20px) calc(env(safe-area-inset-left, 0px) + 24px);
    border: 0; border-radius: 0; background: var(--ep-mobile-top-light), #fff; color: #1c2129;
    background-size: 100% calc(88px + var(--ep-phone-safe-top)); background-repeat: no-repeat;
    box-shadow: none; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom;
  }
  .ep-mobile-account-drawer[open] { display: flex; flex-direction: column; }
  .ep-mobile-account-drawer::backdrop { background: rgb(20 29 41 / 34%); }
  .ep-my-drawer-head { padding-bottom: 19px; }
  .ep-my-drawer-head > div { display: flex; align-items: flex-start; justify-content: space-between; }
  .ep-my-drawer-head .ep-my-avatar { width: 55px; height: 55px; font-size: 1.5rem; }
  .ep-my-drawer-head button { margin: -6px -8px 0 0; color: #697481; }
  .ep-my-drawer-head button svg { width: 19px; height: 19px; }
  .ep-my-drawer-head h2 { margin: 15px 0 3px; font: 700 1.5rem/1.25 system-ui, sans-serif; overflow-wrap: anywhere; }
  .ep-my-drawer-head p, .ep-my-sign-in { margin: 0; font: normal .93rem/1.45 system-ui, sans-serif; overflow-wrap: anywhere; }
  .ep-my-drawer-head p { color: #616b7a; }
  .ep-my-drawer-head .ep-my-sign-in { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #365781; text-decoration: none; font-weight: 550; }
  .ep-my-drawer-links { padding-block: 12px; }
  .ep-my-drawer-settings { margin-top: auto; padding-top: 12px; }
  .ep-mobile-account-drawer nav :is(a, summary) {
    display: flex; align-items: center; gap: 18px; min-height: 58px; color: inherit;
    font: 620 1.15rem/1.35 system-ui, sans-serif; text-decoration: none;
  }
  .ep-mobile-account-drawer nav :is(a, summary) svg { width: 24px; height: 24px; flex: none; }
  .ep-mobile-account-drawer :is(a, summary):active { color: #395c90; }
  .ep-my-install summary { cursor: pointer; list-style: none; }
  .ep-my-install summary::-webkit-details-marker { display: none; }
  .ep-my-install-chevron { display: flex; margin-inline-start: auto; padding-inline-end: 4px; color: #657387; }
  .ep-mobile-account-drawer .ep-my-install-chevron svg { width: 16px; height: 16px; }
  .ep-my-install[open] .ep-my-install-chevron { transform: rotate(180deg); }
  .ep-my-install-help {
    margin-block-end: 8px; padding: 12px 14px; border-radius: 14px;
    background: #f0f3f9; color: #43516b; font: .875rem/1.6 system-ui, sans-serif;
  }
  .ep-my-install-help p { margin: 0; }
  .ep-my-install-help button:not([hidden]) {
    display: inline-flex; align-items: center; min-height: 44px; margin-block-start: 8px; padding-inline: 14px;
    border: 0; border-radius: 12px; background: #293555; color: #fff; font: 620 .875rem/1.25 system-ui, sans-serif; cursor: pointer;
  }
  :is(.ep-mobile-account-drawer, .ep-mobile-profile-bar) :is(button, a, summary):focus-visible { outline: 2px solid #465f99; outline-offset: 2px; }
}
@media (max-width: 600px) and (max-height: 700px) and (orientation: portrait) {
  .ep-mobile-account-drawer:has(.ep-my-install[open]) nav :is(a, summary) { min-height: 52px; }
}
@media (min-width: 520px) and (max-height: 500px) {
  body.ep-mobile-shell .ep-mobile-account-drawer[open] {
    display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); align-content: start;
    column-gap: clamp(16px, 4vw, 36px);
    padding-block: calc(var(--ep-phone-safe-top) + 12px) calc(var(--ep-phone-safe-bottom) + 12px);
  }
  .ep-mobile-account-drawer .ep-my-drawer-head { grid-row: span 2; }
  .ep-mobile-account-drawer .ep-my-drawer-links,
  .ep-mobile-account-drawer .ep-my-drawer-settings { margin: 0; padding-block: 0; }
  .ep-mobile-account-drawer nav :is(a, summary) { min-height: 48px; }
}
@media screen and (max-width: 350px) {
  body.ep-mobile-shell .ep-mobile-profile-bar:not([hidden]) { --bar-inset: 16px; }
}
@media screen and (max-width: 600px) and (prefers-reduced-motion: no-preference), screen and (pointer: coarse) and (max-width: 1000px) and (max-height: 500px) and (prefers-reduced-motion: no-preference) {
  .ep-mobile-account-drawer {
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.18,.78,.28,1), overlay .24s allow-discrete, display .24s allow-discrete;
  }
  .ep-mobile-account-drawer[open] { transform: translateX(0); }
  .ep-mobile-account-drawer::backdrop {
    opacity: 0; transition: opacity .2s ease-out, overlay .2s allow-discrete, display .2s allow-discrete;
  }
  .ep-mobile-account-drawer[open]::backdrop { opacity: 1; }
  @starting-style {
    .ep-mobile-account-drawer[open] { transform: translateX(-100%); }
    .ep-mobile-account-drawer[open]::backdrop { opacity: 0; }
  }
}
@media print { .ep-mobile-account-drawer { display: none !important; } }
