:root {
  /* Shared design tokens used by the landing page and modal components. */
  color-scheme: only light;
  --ink: #243746;
  --muted: #6c7b77;
  --blue: #3d7890;
  --blue-dark: #28566b;
  --gold: #e4ae4b;
  --coral: #d87961;
  --mint: #b8d5c1;
  --white: #fffdf7;
  --shadow: 0 18px 45px rgba(49, 65, 70, 0.12);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #faf7e8;
}

/* Reset and document-wide defaults. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: #faf9f4;
}
.landing-atmosphere {
  display: block;
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.landing-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/pages/shared/backgrounds/topographic-storybook-pale-v4.webp")
    center / cover no-repeat;
  opacity: 0.2;
}
.landing-atmosphere .topo-map {
  display: block !important;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}
/* Keep the illustrated map and animated routes inside the viewport as the
   aspect ratio changes; the desktop composition remains the reference. */
@media (orientation: portrait) and (min-width: 761px) and (max-width: 1100px) {
  .landing-atmosphere::before {
    background-size: cover;
    background-position: center center;
    opacity: 0.16;
  }
  .landing-atmosphere .topo-map {
    opacity: 0.62;
  }
}
@media (max-width: 760px) {
  /* Use the stable viewport on mobile so browser chrome changes do not
     resize the fixed map while the document is being scrolled. */
  .landing-atmosphere {
    inset: 0 0 auto;
    height: 100svh;
    min-height: 100svh;
  }
  .landing-atmosphere::before {
    background-size: cover;
    background-position: center center;
    opacity: 0.14;
  }
  .landing-atmosphere .topo-map {
    opacity: 0.56;
  }
  .landing-atmosphere .map-trail {
    stroke-width: 1.9;
  }
  .landing-atmosphere .trail-end {
    stroke-width: 3;
  }
}
@media (orientation: landscape) and (max-width: 1100px) {
  html,
  body {
    overflow-x: hidden;
  }
  .landing-atmosphere {
    contain: paint;
    isolation: isolate;
  }
  .landing-atmosphere::before {
    background-size: cover;
  }
  .landing-atmosphere .topo-map {
    opacity: 0.62;
    contain: paint;
    isolation: isolate;
  }
  .landing-atmosphere .trail-reveal {
    will-change: stroke-dashoffset;
  }
}
@media (orientation: portrait) and (max-width: 1100px) {
  .landing-atmosphere {
    contain: paint;
    isolation: isolate;
  }
  .landing-atmosphere .topo-map {
    contain: paint;
    isolation: isolate;
  }
  .landing-atmosphere .trail-reveal {
    will-change: stroke-dashoffset;
  }
}
@media (max-width: 420px) {
  .landing-atmosphere::before {
    background-size: cover;
    opacity: 0.12;
  }
  .landing-atmosphere .topo-map {
    opacity: 0.5;
  }
  .landing-atmosphere .map-trail {
    stroke-width: 1.7;
  }
  .landing-atmosphere .trail-end {
    stroke-width: 2.8;
  }
}
.map-trail {
  fill: none;
  stroke: rgba(40, 86, 107, 0.52);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 8 12;
  vector-effect: non-scaling-stroke;
}
.trail-end {
  fill: none;
  stroke: rgba(216, 121, 97, 0.95);
  stroke-width: 3.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 1;
  animation: none;
}
.trail-reveal {
  fill: none;
  stroke: #fff;
  /* Wide enough to reveal the endpoint cross when the mask reaches it. */
  stroke-width: 28;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  opacity: 1;
  animation: trail-mask-cycle 24s linear infinite;
}
.trail-pack {
  opacity: 0.62;
}
.trail-left-two {
  animation-delay: -2.4s;
}
.trail-left-three {
  animation-delay: -4.8s;
}
.trail-right-one {
  animation-delay: -7.2s;
}
.trail-right-two {
  animation-delay: -9.6s;
}
.trail-right-three {
  animation-delay: -12s;
}
.trail-reveal-left-two {
  animation-delay: -2.4s;
}
.trail-reveal-left-three {
  animation-delay: -4.8s;
}
.trail-reveal-right-one {
  animation-delay: -7.2s;
}
.trail-reveal-right-two {
  animation-delay: -9.6s;
}
.trail-reveal-right-three {
  animation-delay: -12s;
}
/*
 * The mask is the only thing that reveals the route.  Moving its dash from
 * 1 to 0 exposes the path from its start; moving it from 0 to -1 removes
 * the already exposed part from that same start toward the end.
 */
@keyframes trail-mask-cycle {
  0% {
    stroke-dashoffset: 1;
  }
  48% {
    stroke-dashoffset: 0;
  }
  72% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -1;
  }
}
.shell {
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .landing-atmosphere .map-trail,
  .landing-atmosphere .trail-end,
  .landing-atmosphere .trail-reveal {
    animation: none;
  }
  .landing-atmosphere .map-trail,
  .landing-atmosphere .trail-end {
    opacity: 0.7;
    transform: none;
  }
  .landing-atmosphere .trail-reveal {
    stroke-dashoffset: 0;
  }
  .landing-atmosphere .route::after {
    animation: none;
  }
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  max-width: 1180px;
  margin: auto;
  padding: 22px 28px 64px;
  background: transparent;
  box-shadow: none;
}
/* Header navigation and responsive menu. */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand span {
  color: var(--coral);
}
.nav-menu {
  display: contents;
}
.menu-toggle {
  display: none;
}
.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--blue-dark);
}
.support-link {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.support-link:hover,
.support-link:focus-visible {
  color: var(--coral);
}
/* Reusable buttons and pills. */
.pill,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  border: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.pill {
  background: rgba(255, 255, 255, 0.7);
  color: var(--blue-dark);
}
.button {
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 0 #285d72;
}
.button.gold {
  background: var(--gold);
  color: #463717;
  box-shadow: 0 8px 0 #c38d32;
}

/* Email-change recovery dialog. Keep the browser-native dialog semantics,
   but bring its surface and actions into the site's visual language. */
.revert-dialog {
  width: min(440px, 90vw);
  max-width: 90vw;
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow);
}
.revert-dialog::backdrop {
  background: rgba(36, 55, 70, 0.48);
  backdrop-filter: blur(2px);
}
.revert-dialog-card {
  padding: clamp(24px, 6vw, 36px);
  border: 1px solid rgba(61, 120, 144, 0.16);
  border-radius: 26px;
  background: var(--white);
}
.revert-dialog h2 {
  font-size: clamp(1.55rem, 5vw, 2rem);
}
.revert-dialog p {
  margin: 16px 0 0;
  color: var(--muted);
}
.revert-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.revert-dialog-actions .button {
  min-height: 44px;
  flex: 1 1 170px;
  padding: 12px 18px;
}
.revert-dialog-secondary {
  background: rgba(61, 120, 144, 0.12);
  color: var(--blue-dark);
  box-shadow: none;
}
.revert-dialog-status:empty {
  display: none;
}
.revert-dialog-status {
  font-size: 0.9rem;
  font-weight: 600;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--coral);
}
h1,
h2,
h3 {
  font-family: "Rubik", "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}
h1 {
  font-size: clamp(2.8rem, 6vw, 5.7rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}
p {
  line-height: 1.6;
}
.card {
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(61, 120, 144, 0.14);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
/* Landing hero and primary illustration. */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 46px;
  padding: 70px 0 80px;
}
.hero-copy {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.hero h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.2rem);
}
.hero-title {
  width: min(100%, 520px);
  max-width: none;
}
.hero-title-shift {
  display: inline-block;
}
.hero-copy p {
  width: 100%;
  margin: 0;
  max-width: 500px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--muted);
  text-align: left;
  text-indent: 0;
}
.hero-copy p .text-fade-word,
.hero-copy p .text-fade-char {
  letter-spacing: normal;
}
.hero-copy p .text-fade-word {
  display: inline-block;
}
.hero-copy p .text-fade-char {
  display: inline;
}
.hero-copy p > .text-fade-space:first-child {
  display: none;
}
.hero-copy p .text-fade-space {
  white-space: normal;
}
.section-head .section-intro > .text-fade-space:first-child {
  display: none;
}
.section-head .section-intro .text-fade-space {
  white-space: normal;
}
.hero-art {
  min-width: 0;
  min-height: 400px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: visible;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  filter: saturate(0.9) contrast(0.96);
}
.welcome-art {
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.polaroid {
  width: 120%;
  padding: 16px 16px 68px;
  background: #fffefa;
  border: 1px solid #e5e0d4;
  box-shadow: 0 18px 18px -10px rgba(49, 65, 70, 0.28);
  transform: rotate(3.5deg);
}
.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.98);
}
.tag {
  position: absolute;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff8dc;
  transform: rotate(-5deg);
  box-shadow: 0 8px 18px #33445522;
  font-weight: 700;
}
.tag.one {
  top: 28px;
  left: 24px;
}
.tag.two {
  right: 20px;
  bottom: 26px;
  transform: rotate(5deg);
}
.section {
  padding: 30px 0 66px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}
.section-head p {
  max-width: 440px;
  color: var(--muted);
  margin: 0;
}
.section-head .section-intro {
  margin-top: 12px;
  max-width: none;
  white-space: nowrap;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tile {
  padding: 0 24px 24px;
  min-height: 180px;
  overflow: hidden;
}
/* Course cards and progress summary. */
.course-preview {
  padding-top: 18px;
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.story-card {
  display: grid;
  grid-template-columns: minmax(280px, 34%) 1fr;
  overflow: hidden;
  min-height: 250px;
}
.story-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.97);
}
.story-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 36px;
}
.story-copy small {
  color: var(--coral);
  font-weight: 700;
}
.story-copy h3 {
  margin: 12px 0 10px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}
.story-copy p {
  color: var(--muted);
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
}
.story-card-cta {
  background: rgba(255, 253, 247, 0.78);
  border-color: rgba(61, 120, 144, 0.14);
}
.rank-story-card .story-image {
  object-fit: contain;
  padding: 18px;
  background: #fffefa;
}
.rank-story-card {
  height: 250px;
  min-height: 250px;
}
.rank-story-card .story-image,
.rank-story-card .story-copy {
  min-height: 0;
}
.rank-story-card .medal-stack {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #fffefa;
}
.rank-story-card .medal-stack img {
  position: absolute;
  display: block;
  width: 58%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 5px 4px rgba(67, 47, 22, 0.18));
}
.rank-story-card .medal-stack .medal-back {
  opacity: 0.82;
}
.rank-story-card .medal-stack .medal-back-left {
  left: 4%;
  bottom: -5%;
  transform: rotate(-13deg);
}
.rank-story-card .medal-stack .medal-back-right {
  right: 2%;
  bottom: -5%;
  transform: rotate(13deg);
}
.rank-story-card .medal-stack .medal-front {
  z-index: 2;
  left: 21%;
  bottom: -7%;
  width: 64%;
  height: 96%;
}
.progress-card {
  margin-top: 22px;
  padding: 22px 24px 20px;
  background: rgba(255, 253, 247, 0.84);
}
.progress-heading,
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}
.progress-heading h3 {
  margin-top: 8px;
  font-size: 1.5rem;
}
.progress-heading strong {
  color: var(--coral);
  font-size: 0.95rem;
}
.progress-card .progress {
  margin-top: 18px;
  height: 14px;
}
.progress i {
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--gold));
}
.progress-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.84rem;
}
.course-total-meta {
  display: flex;
  gap: 18px;
  margin-top: 7px;
  color: var(--blue-dark);
  font-size: 0.84rem;
  font-weight: 700;
}
.stream-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 18px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #d8e0d5;
}
.stream-list div {
  display: grid;
  gap: 3px;
}
.rank-avatar {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(174, 126, 54, 0.42);
  box-shadow: 0 3px 8px rgba(72, 51, 25, 0.14);
  margin-bottom: 3px;
}
.stream-list span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}
.stream-list strong {
  color: var(--blue-dark);
  font-size: 0.78rem;
  line-height: 1.25;
}
.mission-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.mission-dots span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e6eadc;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.mission-dots .done {
  background: var(--mint);
  color: var(--blue-dark);
}
.mission-dots .current {
  background: var(--gold);
  color: #463717;
  box-shadow: 0 0 0 4px rgba(228, 174, 75, 0.2);
}
.lesson-image {
  display: block;
  width: calc(100% + 48px);
  margin: 0 -24px 20px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 25px 25px 0 0;
  filter: saturate(0.9) contrast(0.97);
}
.tile small {
  color: var(--coral);
  font-weight: 700;
}
.tile h3 {
  margin: 13px 0 8px;
  font-size: 1.45rem;
}
.tile p {
  color: var(--muted);
  margin-bottom: 0;
}
.progress {
  height: 10px;
  background: #e6eadc;
  border-radius: 99px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--coral);
  border-radius: inherit;
}
.footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 25px;
  border-top: 1px solid #d8e0d5;
}
.back-to-top {
  display: flex;
  margin: 28px auto 8px;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.reveal-left {
  transform: translateX(-28px);
}
.reveal.reveal-right {
  transform: translateX(28px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translate(0);
}
.story-grid .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.story-grid .reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.story-grid .reveal:nth-child(4) {
  transition-delay: 0.24s;
}
.text-fade-in {
  display: block;
}
.text-fade-word {
  display: inline-block;
  white-space: nowrap;
}
.text-fade-space {
  white-space: pre;
}
.text-fade-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.3em);
}
.text-fade-word-unit {
  opacity: 0;
  transform: translateY(0.2em);
}
.text-fade-in.is-typed .text-fade-char,
.reveal.is-visible .text-fade-char {
  animation: text-fade-in 0.52s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--char-index) * 0.028s);
}
.text-fade-in.is-typed .text-fade-word-unit,
.reveal.is-visible .text-fade-word-unit {
  animation: text-fade-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--char-index) * 0.045s);
}
@keyframes text-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 761px) {
  .hero-title-shift {
    position: relative;
    left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.reveal-left,
  .reveal.reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
body.modal-open {
  overflow: hidden;
}
/* Parent, support, and authentication overlays. */
.parent-modal[hidden] {
  display: none;
}
.parent-modal {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: grid;
  place-items: center;
  padding: 20px;
}
.parent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 55, 70, 0.46);
  backdrop-filter: blur(5px);
}
.parent-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 620px);
  max-height: min(720px, calc(100vh - 40px));
  padding: 38px 38px 28px;
  border: 1px solid rgba(61, 120, 144, 0.18);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(36, 55, 70, 0.25);
  animation: auth-pop 0.18s ease-out;
}
.parent-dialog-content {
  overflow-y: auto;
  padding-right: 5px;
}
.parent-dialog h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3rem);
}
.parent-dialog h3 {
  margin: 28px 0 0;
  color: var(--blue-dark);
  font:
    700 clamp(1.25rem, 3vw, 1.7rem) / 1.2 "Rubik",
    sans-serif;
}
.parent-dialog p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}
.parent-points {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0 0 0 20px;
  color: var(--blue-dark);
  line-height: 1.45;
}
.parent-points li::marker {
  color: var(--coral);
}
.parent-close {
  align-self: stretch;
  margin-top: 24px;
}
.auth-modal[hidden] {
  display: none;
}
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 55, 70, 0.46);
  backdrop-filter: blur(5px);
}
.auth-dialog {
  position: relative;
  width: min(100%, 470px);
  padding: 38px;
  border: 1px solid rgba(61, 120, 144, 0.18);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(36, 55, 70, 0.25);
  animation: auth-pop 0.18s ease-out;
}
.auth-close {
  position: absolute;
  top: 13px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  flex: 0 0 36px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef4e9;
  color: var(--blue-dark);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.auth-dialog h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 6vw, 2.8rem);
}
.auth-step[data-auth-step="email"] form {
  margin-top: 40px;
}
.auth-lead {
  margin: 14px 0 24px;
  color: var(--muted);
  line-height: 1.5;
}
.auth-label {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 700;
}
.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #c9d7d1;
  border-radius: 13px;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  outline: none;
}
.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(61, 120, 144, 0.14);
}
.auth-step[data-auth-step="email"] [data-turnstile] {
  display: flex;
  justify-content: flex-start;
  min-height: 65px;
  margin: 14px 0 0;
  overflow: hidden;
}
.auth-step[data-auth-step="email"] [data-turnstile] iframe {
  max-width: 100%;
}
.auth-turnstile-action-row {
  display: block;
}
.auth-otp {
  letter-spacing: 0.24em;
  font-weight: 700;
  text-align: center;
}
.auth-submit {
  width: 100%;
  margin-top: 10px;
}
.auth-error {
  min-height: 20px;
  margin: 7px 0 0;
  color: #b84d46;
  font-size: 0.82rem;
}
.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.support-modal[hidden] {
  display: none;
}
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}
.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 55, 70, 0.46);
  backdrop-filter: blur(5px);
}
.support-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  max-height: min(760px, calc(100vh - 40px));
  min-height: 0;
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(61, 120, 144, 0.18);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(36, 55, 70, 0.25);
  animation: auth-pop 0.18s ease-out;
}
@media (min-width: 1101px) and (hover: hover) {
  .support-dialog {
    max-height: min(820px, calc(100vh - 40px));
  }
}
.support-dialog h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 6vw, 2.8rem);
}
.support-dialog form {
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 12px 0;
}
.support-dialog .auth-label {
  margin-top: 8px;
  margin-bottom: 7px;
}
.support-dialog form > .auth-label:first-of-type {
  margin-top: 0;
}
.support-dialog .auth-submit {
  margin-top: 0;
}
.support-actions {
  flex: 0 0 auto;
  display: grid;
  gap: 24px;
  margin-top: 10px;
  padding-right: 8px;
}
.support-actions .support-submit,
.support-actions .parent-close {
  width: 100%;
  margin-top: 0;
}
.support-message {
  min-height: 70px;
  padding: 12px 14px;
  resize: vertical;
}
.support-files {
  width: 100%;
  font: 0.82rem inherit;
  color: var(--muted);
}
.support-file-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.support-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d7e1da;
  border-radius: 10px;
  background: rgba(238, 244, 233, 0.66);
  color: var(--blue-dark);
  font-size: 0.78rem;
}
.support-file-list li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-file-remove {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--coral);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.support-file-remove:hover,
.support-file-remove:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
}
.support-hint,
.support-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.support-status {
  min-height: 18px;
  color: var(--blue-dark);
}
.support-turnstile {
  min-height: 0;
  margin-top: 14px;
}
.support-success {
  display: grid;
  gap: 14px;
  align-content: center;
  flex: 1 1 auto;
  min-height: 220px;
  padding: 28px 8px;
  color: var(--blue-dark);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
}
.support-success[hidden],
.support-actions [hidden] {
  display: none;
}
.support-success.is-visible {
  animation: support-success-in 0.38s ease-out forwards;
}
.support-success strong {
  font:
    700 clamp(2rem, 6vw, 3.2rem) / 1.05 "Rubik",
    sans-serif;
  text-transform: uppercase;
}
.support-success span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
@keyframes support-success-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:disabled {
  color: var(--muted);
  cursor: wait;
  text-decoration: none;
}
@keyframes auth-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 760px) {
  .shell {
    padding-inline: 18px;
  }
  .nav {
    position: relative;
  }
  .menu-toggle {
    position: relative;
    display: block;
    gap: 0;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(61, 120, 144, 0.16);
    border-radius: 13px;
    background: rgba(255, 253, 247, 0.8);
    color: var(--blue-dark);
    cursor: pointer;
  }
  .menu-toggle span {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    display: block;
    height: 2px;
    margin-top: -1px;
    border-radius: 99px;
    background: currentColor;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }
  .menu-toggle span:nth-child(1) {
    transform: translateY(-6px);
  }
  .menu-toggle span:nth-child(3) {
    transform: translateY(6px);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg);
  }
  .nav-menu {
    position: absolute;
    z-index: 5;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(61, 120, 144, 0.16);
    border-radius: 20px;
    background: rgba(255, 253, 247, 0.97);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }
  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links {
    display: grid;
    gap: 0;
  }
  .nav-links > * {
    padding: 12px 4px;
    text-align: center;
    border-bottom: 1px solid rgba(61, 120, 144, 0.12);
  }
  .nav-links > *:last-child {
    border-bottom: 0;
  }
  .nav-actions {
    display: grid;
    gap: 10px;
    align-items: stretch;
  }
  .nav-actions .support-link,
  .nav-actions .pill {
    width: 100%;
    min-height: 44px;
  }
  .nav-actions .support-link {
    border: 1px solid rgba(61, 120, 144, 0.16);
    border-radius: 12px;
  }
  .nav-actions .pill {
    background: var(--blue);
    color: #fff;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 46px;
  }
  .hero-art {
    min-height: 280px;
    padding: 8px;
  }
  .polaroid {
    width: 100%;
    padding: 10px 10px 44px;
  }
  .grid,
  .story-grid {
    grid-template-columns: 1fr;
  }
  .story-card {
    display: block;
  }
  .story-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .story-copy {
    padding: 24px 22px 26px;
  }
  .section-head {
    display: block;
  }
  .section-head .section-intro {
    white-space: normal;
  }
  .progress-heading,
  .progress-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}
@media (max-width: 520px) {
  .parent-dialog {
    padding: 30px 22px 22px;
    border-radius: 22px;
  }
  .parent-dialog h2 {
    font-size: 2rem;
  }
  .auth-dialog,
  .support-dialog {
    padding: 32px 22px 24px;
    border-radius: 22px;
  }
  .auth-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 760px) {
  .rank-story-card {
    height: auto;
    min-height: 0;
  }
}

/* Планшеты: длинное описание секции не должно выталкивать страницу за viewport. */
@media (max-width: 2200px) and (hover: none) {
  .shell {
    max-width: 1180px;
    overflow-x: hidden;
  }
  .section-head,
  .section-head > div {
    min-width: 0;
  }
  .section-head .section-intro {
    max-width: 100%;
    white-space: normal;
  }
}

/* Главная: тот же раскрываемый прогресс, что и в дневнике. */
.main-progress-card {
  margin-top: 22px;
  padding: 28px 30px 24px;
  background: rgba(255, 253, 247, 0.88);
}
.main-progress-card .progress-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.main-progress-card .progress-title-row h2 {
  margin-top: 8px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.main-progress-card .progress-title-row > div {
  flex: 1;
  min-width: 0;
}
.main-progress-card .progress-title-row > strong {
  color: var(--coral);
  font:
    700 0.92rem "Rubik",
    sans-serif;
  white-space: nowrap;
}
.main-progress-card .progress-description {
  width: 100%;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}
.main-progress-card .progress-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
}
.main-progress-card .progress-summary strong {
  color: var(--coral);
  font:
    700 1.8rem "Rubik",
    sans-serif;
}
.main-progress-card .progress-summary span {
  font-size: 0.82rem;
}
.main-progress-card .course-progress {
  height: 13px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #dfd2b3;
  box-shadow: inset 0 2px 4px rgba(95, 64, 29, 0.12);
}
.main-progress-card .course-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold));
}
.main-progress-card .progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.74rem;
}
.main-progress-card .progress-stats {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 14px;
}
.main-progress-card .progress-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(114, 86, 43, 0.18);
  border-radius: 10px;
  background: rgba(255, 248, 218, 0.58);
}
.main-progress-card .progress-stats .trainer-hit-rate-stat {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 3px 10px;
}
.main-progress-card .trainer-hit-rate-stat small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.58rem;
}
.main-progress-card .progress-stats span {
  color: var(--muted);
  font-size: 0.72rem;
}
.main-progress-card .progress-stats strong {
  color: var(--blue);
  font:
    700 0.82rem "Rubik",
    sans-serif;
  white-space: nowrap;
}
.main-progress-card .lesson-browser {
  max-height: 420px;
  margin-top: 16px;
  padding-right: 5px;
  overflow-y: auto;
  scrollbar-color: rgba(71, 123, 132, 0.7) rgba(223, 210, 179, 0.55);
  scrollbar-width: thin;
}
.main-progress-card .lesson-browser::-webkit-scrollbar {
  width: 7px;
}
.main-progress-card .lesson-browser::-webkit-scrollbar-track {
  border-radius: 99px;
  background: rgba(223, 210, 179, 0.55);
}
.main-progress-card .lesson-browser::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(71, 123, 132, 0.7);
}
.main-progress-card .flow-group {
  border: 1px solid rgba(114, 86, 43, 0.2);
  border-radius: 10px;
  background: rgba(255, 248, 218, 0.48);
}
.main-progress-card .flow-group + .flow-group {
  margin-top: 8px;
}
.main-progress-card .flow-group[open] {
  border-color: rgba(71, 123, 132, 0.38);
  background: rgba(255, 248, 218, 0.72);
}
.main-progress-card .flow-group summary {
  display: grid;
  grid-template-columns: 28px 1fr auto 18px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.main-progress-card .flow-group summary::-webkit-details-marker {
  display: none;
}
.main-progress-card .flow-group summary::after {
  content: "＋";
  color: var(--blue);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.main-progress-card .flow-group[open] summary::after {
  content: "−";
}
.main-progress-card .flow-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #c8b88d;
  border-radius: 50%;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
}
.main-progress-card .flow-group[open] .flow-number {
  border-color: var(--gold);
  background: var(--gold);
  color: #5b4420;
}
.main-progress-card .flow-group summary b {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.2;
}
.main-progress-card .flow-group summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}
.main-progress-card .flow-group summary em {
  color: var(--muted);
  font-size: 0.62rem;
  font-style: normal;
}
.main-progress-card .flow-group:first-child summary em {
  color: #5b836e;
}
.main-progress-card .lesson-list {
  display: grid;
  gap: 4px;
  padding: 0 12px 11px 48px;
}
.main-progress-card .lesson-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  align-items: center;
  padding: 7px;
  border-top: 1px dashed rgba(111, 83, 44, 0.17);
  color: var(--muted);
}
.main-progress-card .lesson-row > span {
  color: #a99a78;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}
.main-progress-card .lesson-row b {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
}
.main-progress-card .lesson-row.done {
  color: #5b836e;
}
.main-progress-card .lesson-row.done > span {
  color: #5b836e;
}
.main-progress-card .lesson-row.current {
  border-radius: 6px;
  background: rgba(226, 170, 71, 0.18);
  color: var(--ink);
}
.main-progress-card .lesson-row.current > span {
  color: var(--coral);
}
@media (max-width: 760px) {
  .main-progress-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 22px 18px 18px;
  }
  .main-progress-card .progress-title-row {
    gap: 10px;
  }
  .main-progress-card .progress-title-row h2 {
    font-size: 1.55rem;
  }
  .main-progress-card .progress-title-row > strong {
    font-size: 0.68rem;
  }
  .main-progress-card .progress-summary {
    margin-top: 14px;
  }
  .main-progress-card .progress-description {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
  }
  .main-progress-card .progress-summary span {
    font-size: 0.62rem;
  }
  .main-progress-card .progress-meta {
    font-size: 0.58rem;
  }
  .main-progress-card .progress-stats {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .main-progress-card .progress-stats div {
    display: grid;
    gap: 3px;
    padding: 7px;
  }
  .main-progress-card .progress-stats .trainer-hit-rate-stat {
    grid-column: 1 / -1;
  }
  .main-progress-card .progress-stats span {
    font-size: 0.52rem;
  }
  .main-progress-card .progress-stats strong {
    font-size: 0.62rem;
  }
  .main-progress-card .flow-group summary {
    grid-template-columns: 24px 1fr auto 14px;
    gap: 6px;
    padding: 8px 7px;
  }
  .main-progress-card .flow-number {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }
  .main-progress-card .flow-group summary b {
    font-size: 0.64rem;
  }
  .main-progress-card .flow-group summary small,
  .main-progress-card .flow-group summary em {
    font-size: 0.5rem;
  }
  .main-progress-card .lesson-list {
    padding-left: 34px;
  }
  .main-progress-card .lesson-row {
    grid-template-columns: 16px 1fr;
    gap: 5px;
    padding: 5px 4px;
  }
  .main-progress-card .lesson-row > span,
  .main-progress-card .lesson-row b {
    font-size: 0.56rem;
  }
}

/* На мобильном поле hit-rate тренажёра занимает всю строку, а не половину сетки. */
@media (max-width: 760px) {
  .main-progress-card .progress-stats .trainer-hit-rate-stat {
    grid-column: 1 / -1;
  }
}

/* Узкие экраны: читаемый масштаб и отсутствие горизонтального переполнения. */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }
  .brand {
    font-size: 1.62rem;
  }
  .hero {
    gap: 30px;
    padding-top: 38px;
    padding-bottom: 28px;
  }
  .hero-copy {
    gap: 18px;
    align-items: center;
    text-align: center;
  }
  .hero-copy > div {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  h1 {
    font-size: clamp(2.35rem, 11vw, 3.8rem);
  }
  .hero-copy p {
    width: 100%;
    max-width: 22rem;
    margin-inline: auto;
    font-size: 0.98rem;
    line-height: 1.5;
    text-align: center;
    text-indent: 0;
  }
  .course-preview {
    padding-top: 0;
  }
  .section-head {
    text-align: center;
  }
  .section-head .eyebrow {
    display: block;
    margin-bottom: 8px;
  }
  .section-head .section-intro {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
  }
  .hero-art {
    min-height: 0;
  }
  .back-to-top {
    margin: 16px auto 0;
  }
  .footer {
    padding-top: 14px;
  }
  .story-copy p {
    font-size: 0.88rem;
  }
  .parent-modal,
  .support-modal,
  .auth-modal {
    padding: 12px;
  }
  .parent-dialog,
  .support-dialog,
  .auth-dialog {
    width: min(100%, 620px);
    max-width: 100%;
  }
  .parent-dialog {
    max-height: calc(100dvh - 24px);
    padding: 28px 20px 20px;
  }
  .support-dialog {
    max-height: calc(100dvh - 24px);
    padding: 28px 20px 20px;
  }
  .auth-dialog {
    padding: 30px 20px 22px;
  }
  .parent-dialog-content,
  .support-dialog form,
  .auth-step {
    min-width: 0;
  }
  .auth-input,
  .support-files {
    max-width: 100%;
    min-width: 0;
  }
  .button,
  .pill {
    max-width: 100%;
  }
}

/* Низкий экран в мобильном landscape: карточка поддержки должна целиком
   помещаться в viewport, а прокручиваться только содержимое полей. */
@media (orientation: landscape) and (hover: none) {
  .shell {
    max-width: 1180px;
    overflow-x: hidden;
  }
  .section-head,
  .section-head > div {
    min-width: 0;
  }
  .section-head .section-intro {
    white-space: normal;
    max-width: 100%;
  }

  .support-modal {
    padding: 8px;
  }
  .parent-modal,
  .auth-modal {
    padding: 8px;
    margin-top: 0;
  }
  .support-dialog .auth-close,
  .auth-dialog .auth-close {
    top: 13px;
    right: 16px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    line-height: 1;
  }
  .support-dialog {
    width: min(92vw, 760px);
    max-height: calc(100dvh - 16px);
    padding: 16px 20px 12px;
    border-radius: 22px;
  }
  .parent-dialog,
  .auth-dialog {
    width: min(92vw, 760px);
    max-height: calc(100dvh - 16px);
    padding: 16px 20px 12px;
    border-radius: 22px;
  }
  .parent-dialog h2,
  .auth-dialog h2 {
    margin-top: 5px;
    margin-bottom: 6px;
    font-size: clamp(1.5rem, 5.5vh, 2.25rem);
  }
  .parent-dialog-content {
    padding-right: 8px;
  }
  .parent-dialog h3 {
    margin-top: 16px;
    font-size: clamp(1.05rem, 3.5vh, 1.35rem);
  }
  .parent-dialog p {
    margin-top: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .parent-points {
    gap: 5px;
    margin-top: 10px;
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .parent-close {
    margin-top: 10px;
  }
  .auth-step[data-auth-step="email"] form {
    margin-top: 12px;
  }
  .auth-dialog .auth-lead {
    margin: 5px 0 10px;
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .auth-dialog .auth-label {
    margin-top: 5px;
    margin-bottom: 4px;
    font-size: 0.72rem;
  }
  .auth-dialog .auth-input {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .auth-dialog .auth-error {
    margin-top: 5px;
    font-size: 0.68rem;
  }
  .auth-dialog .auth-submit {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.68rem;
  }
  .auth-turnstile-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .auth-turnstile-action-row [data-turnstile] {
    flex: 1 1 0;
    min-width: 0;
    margin-right: auto;
  }
  .auth-turnstile-action-row .auth-submit {
    flex: 1 1 0;
    width: auto;
    min-height: 65px;
    margin-top: 0;
    font-size: 0.88rem;
    white-space: nowrap;
  }
  .support-dialog h2 {
    margin-top: 5px;
    margin-bottom: 6px;
    font-size: clamp(1.5rem, 5.5vh, 2.25rem);
  }
  .support-dialog .auth-lead {
    margin: 5px 0 10px;
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .support-dialog form {
    padding-right: 8px;
    padding-bottom: 6px;
  }
  .support-dialog .auth-label {
    margin-top: 5px;
    margin-bottom: 4px;
    font-size: 0.72rem;
  }
  .support-dialog .auth-input {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .support-dialog .support-message {
    min-height: 54px;
  }
  .support-dialog .support-hint,
  .support-dialog .support-status,
  .support-dialog .auth-error {
    margin-top: 5px;
    font-size: 0.68rem;
  }
  .support-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 6px;
    padding-right: 0;
  }
  .support-actions .button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.68rem;
  }
}

/* iPad portrait: Safari can expose a hover-capable pointer, so do not rely
   on the touch-only query above for the page-width and text-wrap safeguards. */
@media (orientation: portrait) and (min-width: 761px) and (max-width: 1100px) {
  html,
  body {
    overflow-x: hidden;
  }
  .shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }
  .section-head,
  .section-head > div {
    min-width: 0;
    width: 100%;
  }
  .section-head .section-intro,
  .section-head .section-intro .text-fade-word,
  .section-head .section-intro .text-fade-space {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-inline: 14px;
  }
  .main-progress-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .brand {
    font-size: 1.42rem;
  }
  .hero {
    padding-top: 30px;
  }
  h1 {
    font-size: 2.2rem;
  }
  .nav-menu {
    left: -2px;
    right: -2px;
  }
}
