/* CELPIP materials pages.
 *
 * The one stylesheet every page under tests/celpip/ loads. It is written by
 * hand, not generated: scripts/celpip_layout.py and scripts/celpip_render.py
 * emit the class names used here. It follows the IELTS sheet
 * (assets/ielts/ielts.css) rule for rule, with a cp- prefix, plus the pieces
 * only CELPIP uses: the test selector, the fact strip and the sample carousel. No utility framework, no runtime: the pages render
 * the same with JavaScript off, apart from the calculators.
 *
 * Breakpoints follow the design: the header collapses into a menu below
 * 1060px, and the sidebar gives way to a row of section chips below 760px.
 */

@font-face {
  font-family: 'ProductSans';
  src: url('../fonts/Product Sans Regular.woff2') format('woff2'),
    url('../fonts/Product Sans Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ProductSans';
  src: url('../fonts/Product Sans Bold.woff2') format('woff2'),
    url('../fonts/Product Sans Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cp-ink: #1d1d3a;
  --cp-title: #111;
  --cp-prose: #4b4d55;
  --cp-soft: #3f4250;
  --cp-muted: #6e7071;
  --cp-brand: #5e61f6;
  --cp-brand-deep: #634bf6;
  --cp-teal: #0f6f7c;
  --cp-grad: linear-gradient(90deg, #634bf6, #4baef6);
  --cp-surface: #f8f9fb;
  --cp-tint: #f1f5ff;
  --cp-chip: #f2f4f7;
  --cp-chip-hover: #e9ecf3;
  --cp-chip-on: #e4f6f8;
  --cp-line: #e6e9f2;
  --cp-line-soft: #eceef3;
  --cp-rule: #eef0f5;
  --cp-gutter: clamp(16px, 3vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.cp {
  margin: 0;
  background: #fff;
  color: var(--cp-ink);
  font-family: 'ProductSans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* The material is ours; copying it wholesale is discouraged. */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.cp input,
.cp select,
.cp textarea {
  -webkit-user-select: text;
  user-select: text;
}

.cp img {
  max-width: 100%;
}

:where(.cp) a {
  color: var(--cp-brand);
  text-decoration: none;
}

/* :where keeps these at element weight, so widgets injected by shared scripts
   (the app banner) keep their own link colours. */
:where(.cp) a:hover {
  color: var(--cp-brand-deep);
  text-decoration: underline;
}

.cp button,
.cp select,
.cp input {
  font-family: inherit;
}

.cp button:focus-visible,
.cp a:focus-visible,
.cp summary:focus-visible,
.cp select:focus-visible,
.cp input:focus-visible {
  outline: 2px solid var(--cp-brand);
  outline-offset: 2px;
}

/* index.js swaps the Log In link for the avatar of a signed-in visitor. */
.cp .hidden {
  display: none !important;
}

.cp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   header
   -------------------------------------------------------------------------- */

.cp-hdr {
  position: relative;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--cp-rule);
}

.cp-hdr__bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px var(--cp-gutter);
}

.cp-logo {
  display: block;
  flex: none;
}

.cp-logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* The test selector: a pill with the test's dot and a native <select>.
   An inline script in the page sends the visitor to the chosen test. */
.cp-test {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--cp-chip);
  border-radius: 999px;
  font-size: 14px;
  color: var(--cp-ink);
  white-space: nowrap;
  cursor: pointer;
}

.cp-test:hover {
  background: var(--cp-chip-hover);
}

.cp-test select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--cp-ink);
  padding: 0 22px 0 0;
  cursor: pointer;
  outline-offset: 4px;
}

.cp-test .cp-caret {
  margin-left: -22px;
  pointer-events: none;
}

.cp-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #d52b1e;
}

.cp-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--cp-chip);
  border-radius: 999px;
  font-size: 14px;
  color: var(--cp-ink);
  cursor: pointer;
}

.cp-lang:hover {
  background: var(--cp-chip-hover);
}

.cp-lang svg {
  flex: none;
}

.cp-lang select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--cp-ink);
  padding: 0 22px 0 2px;
  cursor: pointer;
  outline-offset: 4px;
}

.cp-lang .cp-caret {
  margin-left: -22px;
  pointer-events: none;
}

.cp-tabs {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 1.6vw, 22px);
  font-size: 16px;
  font-weight: 700;
}

.cp .cp-tab {
  color: var(--cp-muted);
  padding: 6px 10px;
  border-radius: 8px;
}

.cp .cp-tab:hover {
  color: var(--cp-title);
  text-decoration: none;
}

.cp .cp-tab.is-active {
  color: var(--cp-title);
  background: var(--cp-chip-on);
}

.cp .cp-login {
  flex: none;
  background: var(--cp-grad);
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  white-space: nowrap;
}

.cp .cp-login:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.05);
}

.cp-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #60a5fa;
  object-fit: cover;
}

/* The menu is a <details>, so it opens without JavaScript. Its button sits in
   the header bar; the panel drops below the bar and pushes the page down. */
.cp-mnav {
  display: none;
}

.cp-burger {
  position: absolute;
  top: 16px;
  right: var(--cp-gutter);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--cp-chip);
  color: var(--cp-ink);
  cursor: pointer;
  list-style: none;
}

.cp-burger::-webkit-details-marker {
  display: none;
}

.cp-burger::marker {
  content: '';
}

.cp-burger .cp-i-close,
.cp-mnav[open] .cp-burger .cp-i-open {
  display: none;
}

.cp-mnav[open] .cp-burger .cp-i-close {
  display: block;
}

.cp-mnav__panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--cp-rule);
  font-size: 17px;
}

.cp .cp-mnav__link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--cp-ink);
}

.cp .cp-mnav__link.is-active {
  background: var(--cp-tint);
  color: var(--cp-brand);
  font-weight: 700;
}

.cp-mnav__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}

.cp .cp-mnav__chip {
  background: var(--cp-chip);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--cp-ink);
}

.cp .cp-mnav__chip.is-active {
  background: var(--cp-chip-on);
}

.cp-mnav__lang {
  padding: 4px 0 8px;
}

.cp-mnav__lang .cp-lang {
  padding: 10px 16px;
}

.cp .cp-mnav__login {
  display: block;
  text-align: center;
  padding: 14px;
}

@media (max-width: 1059.98px) {
  .cp-hdr__full {
    display: none !important;
  }

  .cp-hdr__bar {
    padding-right: calc(var(--cp-gutter) + 60px);
  }

  .cp-test {
    padding: 6px 12px;
    font-size: 13px;
  }

  .cp-test select {
    font-size: 13px;
  }

  .cp-mnav {
    display: block;
  }
}

@media (max-width: 759.98px) {
  .cp-logo img {
    height: 32px;
  }

  .cp-burger {
    top: 12px;
  }
}

/* --------------------------------------------------------------------------
   page frame: sidebar + main column
   -------------------------------------------------------------------------- */

.cp-wrap {
  /* content-box, as in the design: 1280px of content inside the gutters */
  box-sizing: content-box;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px var(--cp-gutter) 96px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  min-width: 0;
}

/* A sticky column taller than the window pins its top and puts everything
   below the fold out of reach: the course card could not be scrolled to and
   the lower menu entries looked frozen. Capping it to the viewport lets it
   scroll on its own when it does not fit, and changes nothing when it does,
   so the fully-open sidebar the design asks for is kept. */
.cp-side {
  flex: none;
  width: 220px;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.cp-side__nav {
  background: var(--cp-surface);
  border-radius: 20px;
  padding: 20px 16px;
  font-size: 16px;
}

.cp-side__list,
.cp-side__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.cp-side__list {
  gap: 4px;
}

.cp .cp-side__link {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--cp-ink);
}

.cp .cp-side__link:hover {
  background: #fff;
  text-decoration: none;
}

.cp .cp-side__link.is-active {
  background: #fff;
  font-weight: 700;
  color: var(--cp-brand);
  box-shadow: 0 1px 4px rgba(29, 29, 58, 0.06);
}

.cp-side__sub {
  gap: 2px;
  padding: 4px 0 6px 14px;
  margin: 4px 0 2px 14px;
  border-left: 2px solid #e3e7f3;
}

.cp .cp-side__sub a {
  display: block;
  padding: 7px 12px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--cp-prose);
}

.cp .cp-side__sub a:hover,
.cp .cp-side__sub a.light-blue {
  color: var(--cp-brand);
  text-decoration: none;
}

.cp-premium {
  border-radius: 20px;
  background: linear-gradient(135deg, #f3eeff, #eaf3ff);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-premium__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--cp-brand-deep);
}

.cp-premium__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cp-soft);
}

.cp-premium__text b {
  color: var(--cp-ink);
}

.cp .cp-btn {
  display: block;
  background: var(--cp-grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px;
  border-radius: 10px;
  text-align: center;
}

.cp .cp-btn:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.05);
}

.cp-main {
  flex: 1 1 300px;
  min-width: 0;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  overflow-wrap: break-word;
}

/* Phone-only pieces: the section chips and the in-column premium card. */
.cp-chips,
.cp-premium--inline {
  display: none;
}

@media (max-width: 759.98px) {
  .cp-wrap {
    display: block;
    box-sizing: border-box;
    padding: 16px 16px 96px;
  }

  .cp-side {
    display: none;
  }

  .cp-main {
    gap: 40px;
  }

  .cp-premium--inline {
    display: flex;
    padding: 18px 20px;
  }

  .cp-premium--inline .cp-btn {
    font-size: 15px;
    padding: 13px;
    border-radius: 12px;
  }

  .cp-chips {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 -16px -16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--cp-rule);
  }

  .cp-chips::-webkit-scrollbar {
    display: none;
  }

  .cp .cp-chips a {
    flex: none;
    background: var(--cp-chip);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cp-ink);
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   hero
   -------------------------------------------------------------------------- */

.cp-hero {
  border-radius: 28px;
  background: linear-gradient(110deg, #e9f9fb 0%, #f1f5ff 60%, #f4f0ff 100%);
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-eyebrow {
  margin: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--cp-teal);
}

.cp-h1 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -1px;
  font-weight: 700;
  color: var(--cp-title);
  text-wrap: balance;
}

.cp-lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--cp-soft);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   sections and text blocks
   -------------------------------------------------------------------------- */

.cp-sec {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 72px;
  min-width: 0;
}

.cp-h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--cp-title);
}

.cp-h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--cp-brand);
}

.cp-p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cp-prose);
  text-wrap: pretty;
}

.cp-p:empty {
  display: none;
}

.cp-p strong,
.cp-list strong {
  color: var(--cp-ink);
}

.cp-q {
  font-weight: 700;
  color: var(--cp-ink);
}

.cp-quote {
  border-left: 4px solid var(--cp-brand);
  padding-left: 16px;
  font-style: italic;
}

.cp-note {
  border-radius: 18px;
  background: var(--cp-tint);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-list {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cp-prose);
}

ul.cp-list {
  list-style: disc;
}

ol.cp-list {
  list-style: decimal;
}

ol.cp-list--roman {
  list-style-type: lower-roman;
  padding-left: 36px;
}

.cp-list--tight {
  gap: 6px;
  font-size: 16px;
  line-height: 1.5;
}

.cp-ans {
  color: #15803d;
  font-weight: 700;
}

.cp-muted {
  color: var(--cp-muted);
}

.cp-warn {
  color: #b45309;
}

/* tables: bordered and rounded; a wide one scrolls inside its frame */
.cp-table {
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  overflow-x: auto;
  background: #fff;
}

.cp-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}

.cp-table th {
  text-align: left;
  padding: 14px 18px;
  background: var(--cp-surface);
  font-weight: 700;
  color: var(--cp-ink);
  vertical-align: bottom;
}

.cp-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--cp-line-soft);
  color: var(--cp-soft);
  vertical-align: top;
}

.cp-table td strong {
  color: var(--cp-ink);
}

/* two-column cards */
.cp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.cp-card {
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
}

.cp .cp-card__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--cp-teal);
}

.cp-card__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cp-soft);
}

/* FAQ: an accordion of <details> */
.cp-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-faq__item {
  border-radius: 20px;
  border: 1px solid var(--cp-line);
  background: #fff;
}

.cp-faq__item[open] {
  background: var(--cp-surface);
}

.cp-faq__item > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.cp-faq__item > summary::-webkit-details-marker {
  display: none;
}

.cp-faq__item > summary::after {
  content: '+';
  margin-left: auto;
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--cp-brand-deep);
}

.cp-faq__item[open] > summary::after {
  content: '\2212';
}

.cp-faq__q {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--cp-ink);
}

.cp-faq__a {
  margin: 0;
  padding: 0 22px 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cp-prose);
}

/* worked example and printed task material */
.cp-example,
.cp-task {
  border-radius: 24px;
  background: var(--cp-surface);
  padding: clamp(18px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.cp-passage {
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--cp-line);
  padding: 20px 22px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-box {
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  padding: 16px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-box--text {
  display: block;
  font-size: 17px;
  line-height: 1.65;
  color: var(--cp-prose);
}

.cp-figure {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--cp-line);
  background: #fff;
}

/* multiple-choice options: real radio buttons, so they work without JS */
.cp-opts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 560px;
  padding-left: 12px;
  border-left: 2px solid #d9defa;
}

.cp-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
  color: var(--cp-soft);
}

.cp-opt:hover {
  background: var(--cp-tint);
}

.cp-opt input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  accent-color: var(--cp-brand);
}

/* answer keys and model answers: <details>, open without JS */
.cp-reveal {
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--cp-line);
}

.cp-reveal > summary {
  cursor: pointer;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cp-brand);
}

.cp-reveal > summary::marker {
  color: var(--cp-brand);
}

.cp-reveal__body {
  padding: 2px 18px 16px;
}

.cp-reveal__label {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--cp-ink);
}

.cp-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cp-soft);
}

.cp-model {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--cp-ink);
  text-wrap: pretty;
}

.cp-why {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

/* speaking cue card */
.cp-cue {
  border-radius: 22px;
  background: var(--cp-tint);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-cue__eyebrow {
  margin: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cp-brand-deep);
}

.cp-cue__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--cp-title);
}

.cp-cue__say {
  margin: 0;
  font-size: 15px;
  color: var(--cp-prose);
}

/* audio player: audio.js finds its parts by these class names */
.cp-audio {
  border-radius: 16px;
  background: var(--cp-tint);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cp-audio__ctl {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.cp-audio button {
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.cp-audio button img {
  display: block;
  width: 100%;
  height: 100%;
}

.cp-audio__time {
  color: var(--cp-brand);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.cp-audio .audio-progress {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 6px;
  background: rgba(94, 97, 246, 0.2);
  overflow: hidden;
}

.cp-audio .audio-progress > div {
  max-width: 0%;
  width: 100%;
  height: 100%;
  background: var(--cp-brand);
  transition: max-width 0.3s ease;
}

/* audio.js toggles this on the volume button when muted */
.cp .muted-volume::after {
  content: '';
  position: absolute;
  top: 55%;
  left: -30%;
  width: 140%;
  height: 2px;
  transform: rotate(45deg) translateY(-55%);
  background-color: #000;
}

.cp .transcript-toggle {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--cp-brand);
}

.cp .transcript {
  font-size: 16px;
  line-height: 1.65;
  color: var(--cp-prose);
}

/* author */
.cp-author {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 22px;
  background: var(--cp-surface);
  padding: 20px 22px;
}

.cp-author__photo {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
}

.cp-author__photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 66% 34%;
  transform: scale(2.1);
  transform-origin: 66% 34%;
}

.cp-author__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cp-author__name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #1f2937;
}

.cp-author__bio {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4b5563;
}

.cp-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  white-space: nowrap;
}

.cp-stars__part {
  position: relative;
  display: inline-block;
  color: #d1d5db;
}

.cp-stars__fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 70%;
  overflow: hidden;
  color: #f59e0b;
}

.cp-stars__num {
  margin-left: 4px;
  color: #4b5563;
}

/* floating mock-test button. mobile-app-banner.js moves anything whose class
   ends in -cta-sticky to the left while its desktop card is showing. */
.celpip-cta-sticky {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

.cp .celpip-cta-sticky a {
  display: block;
  background: var(--cp-grad);
  color: #fff;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(99, 75, 246, 0.3);
}

.cp .celpip-cta-sticky a:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.05);
}

/* On a phone the app banner takes the bottom of the screen; the button
   comes back once it is dismissed. */
body.has-app-banner .celpip-cta-sticky {
  display: none;
}

/* --------------------------------------------------------------------------
   footer: a static copy of the main site's footer
   -------------------------------------------------------------------------- */

.ts-footer {
  background: #fafafa;
  padding: 56px 0 36px;
  color: #12284a;
  border-top: 1px solid rgba(18, 40, 74, 0.08);
}

.ts-footer__container {
  max-width: 1470px;
  padding: 0 15px;
  margin: 0 auto;
}

.ts-footer__top {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.ts-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.ts-footer__logo {
  display: block;
  width: 140px;
  height: 90px;
  object-fit: contain;
}

.ts-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 16px;
  line-height: 1.3;
}

.cp .ts-footer__lang {
  color: #183b63;
  font-weight: 700;
}

.cp .ts-footer__lang:hover {
  color: #183b63;
  text-decoration: underline;
}

.cp .ts-footer__lang.is-active:hover {
  text-decoration: none;
}

.ts-footer__desc {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(18, 40, 74, 0.78);
}

.ts-footer__desc p {
  margin: 0;
}

.ts-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.cp .ts-footer__legal a,
.cp .ts-footer__mail {
  color: #183b63;
  font-size: 16px;
  line-height: 1.4;
}

.cp .ts-footer__legal a:hover,
.cp .ts-footer__mail:hover {
  color: #183b63;
  text-decoration: underline;
}

.ts-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.ts-footer__social a {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.ts-footer__social a:hover {
  opacity: 0.72;
}

.ts-footer__social img {
  display: block;
  width: 24px;
  height: 24px;
}

.ts-footer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ts-footer__badges a {
  display: inline-flex;
  align-items: center;
}

.ts-footer__badges img {
  display: block;
  height: 48px;
  width: auto;
}

.ts-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.ts-footer__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.ts-footer__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: #12284a;
}

.ts-footer__links {
  display: grid;
  gap: 14px;
}

.cp .ts-footer__links a {
  color: #183b63;
  font-size: 18px;
  line-height: 1.35;
}

.cp .ts-footer__links a:hover {
  color: #183b63;
  text-decoration: underline;
}

.ts-footer__bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(18, 40, 74, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(18, 40, 74, 0.62);
  font-size: 14px;
  line-height: 1.5;
}

.ts-footer__bottom p {
  margin: 0;
}

@media (max-width: 1100px) {
  .ts-footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .ts-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

@media (max-width: 700px) {
  .ts-footer {
    padding: 40px 0 28px;
  }

  .ts-footer__brand {
    gap: 16px;
  }

  .ts-footer__legal {
    gap: 8px 16px;
  }

  .ts-footer__title {
    font-size: 22px;
  }

  .cp .ts-footer__links a {
    font-size: 16px;
  }

  .ts-footer__bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ts-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .ts-footer__badges {
    gap: 10px;
  }

  .ts-footer__badges img {
    width: auto;
    max-width: 146px;
    height: auto;
  }
}

/* --------------------------------------------------------------------------
   CELPIP-only pieces
   -------------------------------------------------------------------------- */

/* the "at a glance" fact strip */
.cp-stats {
  border-radius: 22px;
  background: var(--cp-tint);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 6px;
}

.cp-stat {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-stat__label {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--cp-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cp-stat__value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cp-title);
}

/* rule warnings and retired question types */
.cp-note--warn {
  background: #fff7e6;
  box-shadow: inset 4px 0 0 #f59e0b;
}

/* a question card: number, prompt, options, and its answer behind a reveal */
.cp-qcard {
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-qcard__head {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.cp-qcard__n {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--cp-brand-deep);
}

.cp-qcard__q {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--cp-ink);
}

.cp-qcard .cp-reveal {
  border: 0;
  background: none;
}

.cp-qcard .cp-reveal > summary {
  padding: 0;
  list-style: none;
}

.cp-qcard .cp-reveal > summary::-webkit-details-marker {
  display: none;
}

.cp-qcard .cp-reveal__body {
  padding: 12px 0 0;
}

.cp-qcard .cp-box {
  background: #f6f8fc;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
}

/* sample carousel: one set at a time, picked with the chips or the arrows.
   Without JavaScript every set is shown, one after another. */
.cp-car {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cp-car__bar {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--cp-surface);
  border-radius: 999px;
  padding: 6px;
}

.cp-car.is-live .cp-car__bar {
  display: flex;
}

.cp-car.is-live .cp-car__slide:not(.is-on) {
  display: none;
}

.cp-car__arrow {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  cursor: pointer;
  border-radius: 50%;
  background: #fff;
  color: var(--cp-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(29, 29, 58, 0.08);
}

.cp-car__arrow:hover {
  color: var(--cp-brand);
}

.cp-car__chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cp-car__chip {
  flex: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  background: #fff;
  color: var(--cp-ink);
}

.cp-car__chip.is-on {
  background: var(--cp-grad);
  color: #fff;
}

.cp-car__pos {
  flex: none;
  font-size: 14px;
  color: var(--cp-muted);
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}

.cp-car__slide {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 72px;
}

@media (max-width: 759.98px) {
  .cp-car__pos {
    display: none;
  }
}

/* the option letter, kept from the printed paper */
.cp-opt__l {
  flex: none;
  width: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cp-brand);
}

/* Hover in the sidebar highlights the entry, it does not underline it: the
   generic a:hover underline reads as a change of state rather than a pointer,
   and on the pages whose menu comes from the design import it was the only
   rule that matched. */
.cp .cp-side a:hover,
.cp .cp-side .aside__list a:hover {
  text-decoration: none;
  color: var(--cp-brand);
}

/* Limited-time offer countdown in the premium card, as on TOEIC. */
.cp-count {
  display: flex;
  gap: 6px;
}

.cp-count__cell {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.cp-count__cell b {
  font-size: 18px;
  color: var(--cp-title);
  font-variant-numeric: tabular-nums;
}

.cp-count__cell small {
  font-size: 11px;
  color: var(--cp-muted);
}
