/* The source template owns the portrait's dimensions at every breakpoint. */
/* The app screen sits on a licensed photograph (Envato QFDY456); the colour shows while it loads. */
.portrait[data-app-preview] {
  --screen-inset: 22px;
  overflow: hidden;
  background: #9c8062 url("/app-showcase/backdrop-table-640.webp") 50% 50% / cover no-repeat;
  background-image: image-set(
    url("/app-showcase/backdrop-table-640.webp") 1x,
    url("/app-showcase/backdrop-table-1280.webp") 2x
  );
  touch-action: pan-y pinch-zoom;
}
/* The screen fills the frame: photograph on three sides, the screen running off the bottom edge behind the caption bar. */
.portrait[data-app-preview] img {
  position: absolute;
  top: var(--screen-inset);
  left: var(--screen-inset);
  width: calc(100% - 2 * var(--screen-inset));
  height: calc(100% - var(--screen-inset));
  object-fit: cover;
  object-position: 50% 0;
  box-shadow: 0 14px 32px rgb(0 0 0 / 0.32);
}
@media (max-width: 700px) {
  .portrait[data-app-preview] { --screen-inset: 16px; }
}
.portrait[data-app-preview] figcaption {
  padding-inline: 44px;
}
.portrait[data-app-preview] button {
  position: absolute;
  inset-block: 0;
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.portrait[data-app-preview] button:hover {
  background: #f0f1eb;
}
.portrait[data-app-preview] button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}
.portrait[data-app-preview] button::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
}
.portrait [data-step="-1"] { left: 0; }
.portrait [data-step="1"] { right: 0; }
.portrait [data-step="-1"]::after { transform: rotate(-135deg); }
.portrait [data-step="1"]::after { transform: rotate(45deg); }

/* Store badges: Apple's and Google's own artwork at one height. In a narrow column both shrink together and stay on one row. */
.store-badges {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 318px;
}
.store-badge {
  position: relative;
  flex: 0 1 144px;
  min-width: 0;
  aspect-ratio: 144 / 48;
  overflow: hidden;
  border-radius: 7px;
  transition: transform var(--motion-feedback) var(--ease-settle);
}
.store-badge img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
/* Google's file carries a quarter of the badge height as clear space on every side; this trims it so both badges line up. */
.store-badge-play {
  flex-basis: 162px;
  aspect-ratio: 162 / 48;
}
.store-badge-play img {
  inset: -25% auto auto -7.41%;
  width: 114.82%;
  height: 150%;
}
.hero-message .store-badges {
  margin-top: 4px;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .store-badge:hover {
    transform: translateY(var(--lift-action));
  }
}
/* The three practice modes, in the app's own words. They wrap rather than shrink in a narrow column. */
.home-method .method-preview {
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 24px;
}
@media (max-width: 700px) {
  .home-method .method-preview { font-size: 21px; gap: 6px 22px; }
}
/* The students' faces sit in the upper part of both subject-card photographs. */
.path-card .photo-faces { object-position: 50% 30%; }
/* Electives grouped by course inside the subject card. */
.course-list {
  margin: 0 0 20px;
  width: 100%;
}
.course-list > div {
  border-top: 1px solid var(--line);
  padding-block: 10px;
}
.course-list dt {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 15px;
}
.course-list dd {
  margin: 2px 0 0;
  color: var(--muted);
}
.footer-end .store-marks {
  flex-basis: 100%;
}

/* Privacy, terms and support pages. */
.legal {
  padding-block: 40px 90px;
}
.legal table,
.legal .legal-facts {
  max-width: 760px;
}
.legal h1 {
  margin-bottom: 20px;
}
.legal h2 {
  font-size: 28px;
  margin: 48px 0 16px;
}
.legal h3 {
  font-size: 21px;
  margin: 28px 0 8px;
}
.legal p,
.legal li {
  text-align: justify;
  hyphens: manual;
}
.legal ul,
.legal ol {
  margin: 0 0 24px;
  padding-left: 22px;
  max-width: 70ch;
}
.legal li {
  margin-bottom: 10px;
}
.legal .legal-facts {
  margin: 28px 0 0;
  border-block: 1px solid var(--line);
  padding-block: 14px;
  font-size: 14px;
}
.legal .legal-facts div {
  display: flex;
  gap: 16px;
  padding-block: 4px;
}
.legal .legal-facts dt {
  flex: 0 0 150px;
  color: var(--muted);
}
.legal .legal-facts dd {
  margin: 0;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-top: 1px solid var(--line);
}
.legal th {
  font-family: var(--heading);
  font-weight: 600;
}
.legal tbody tr:last-child td {
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .legal {
    padding-block: 16px 55px;
  }
  .legal p,
  .legal li {
    text-align: left;
  }
  .legal .legal-facts div {
    flex-direction: column;
    gap: 0;
  }
  .legal .legal-facts dt {
    flex-basis: auto;
  }
}

/* Tighter rhythm between sections (was 90px each side, 55px on phones). */
.home-hero {
  padding-bottom: 44px;
}
.section {
  padding-block: 64px;
}
@media (max-width: 700px) {
  .home-hero {
    padding-bottom: 28px;
  }
  .section {
    padding-block: 44px;
  }
}

/* The study photo fills the height of its copy instead of floating in white space. */
.school-section {
  align-items: stretch;
}
.school-media,
.school-photo {
  height: 100%;
}
.school-photo {
  min-height: 560px;
}
.school-photo img {
  object-position: 50% 22%;
}
@media (max-width: 700px) {
  .school-photo {
    height: 440px;
    min-height: 0;
  }
}

/* Questions: one centred column of numbered cards; the open card turns lime. */
.faq {
  display: grid;
  justify-items: center;
  gap: 40px;
}
.faq-intro {
  max-width: 640px;
  text-align: center;
}
.faq-intro p {
  margin-top: 14px;
  color: var(--muted);
}
.faq-list {
  width: 100%;
  max-width: 880px;
  display: grid;
  gap: 12px;
  counter-reset: faq;
}
.faq details,
.faq details:last-child {
  counter-increment: faq;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #efefe8;
  transition:
    background-color var(--motion-state) ease-out,
    transform var(--motion-feedback) var(--ease-settle),
    box-shadow var(--motion-feedback) var(--ease-settle);
}
.faq details[open] {
  background: var(--lime);
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  list-style: none;
  font-size: 21px;
}
/* The card's lift and the focus outline mark it; an underline would also run under the number. */
.faq summary:hover,
.faq summary:focus-visible {
  text-decoration: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before {
  content: counter(faq, decimal-leading-zero);
  min-width: 22px;
  font: 500 14px/1 var(--body);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.faq details[open] summary::before {
  color: var(--ink);
}
.faq summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--motion-state) var(--ease-settle);
}
.faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.faq .disclosure-body {
  padding: 0 26px 24px 66px;
}
@media (max-width: 700px) {
  .faq {
    gap: 28px;
  }
  .faq-intro {
    text-align: left;
    justify-self: stretch;
  }
  .faq summary {
    gap: 14px;
    padding: 18px;
    font-size: 18px;
  }
  .faq .disclosure-body {
    padding: 0 18px 20px;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .faq details:hover {
    transform: translateY(var(--lift-action));
    box-shadow: var(--shadow-action);
  }
}
/* Entrance (as on the teacher resource portal): the cards rise in one after another, once. */
@media (prefers-reduced-motion: no-preference) {
  .faq-list.reveal-ready details {
    opacity: 0;
  }
  .faq-list.is-in details {
    opacity: 1;
    animation: faq-rise 700ms var(--ease-settle) backwards;
  }
  .faq-list.is-in details:nth-child(2) { animation-delay: 70ms; }
  .faq-list.is-in details:nth-child(3) { animation-delay: 140ms; }
  .faq-list.is-in details:nth-child(4) { animation-delay: 210ms; }
  .faq-list.is-in details:nth-child(5) { animation-delay: 280ms; }
  .faq-list.is-in details:nth-child(6) { animation-delay: 350ms; }
  .faq-list.is-in details:nth-child(7) { animation-delay: 420ms; }
}
@keyframes faq-rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}
@media print {
  .faq-list.reveal-ready details {
    opacity: 1;
  }
}
