/* IELTS materials pages.
 *
 * The one stylesheet every page under tests/ielts/ loads. It is written by
 * hand, not generated: scripts/ielts_common.py and scripts/ielts_render.py emit
 * the class names used here. 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 {
  --ie-ink: #1d1d3a;
  --ie-title: #111;
  --ie-prose: #4b4d55;
  --ie-soft: #3f4250;
  --ie-muted: #6e7071;
  --ie-brand: #5e61f6;
  --ie-brand-deep: #634bf6;
  --ie-teal: #0f6f7c;
  --ie-grad: linear-gradient(90deg, #634bf6, #4baef6);
  --ie-surface: #f8f9fb;
  --ie-tint: #f1f5ff;
  --ie-chip: #f2f4f7;
  --ie-chip-hover: #e9ecf3;
  --ie-chip-on: #e4f6f8;
  --ie-line: #e6e9f2;
  --ie-line-soft: #eceef3;
  --ie-rule: #eef0f5;
  --ie-gutter: clamp(16px, 3vw, 32px);
}

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

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

body.ie {
  margin: 0;
  background: #fff;
  color: var(--ie-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;
}

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

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

:where(.ie) a {
  color: var(--ie-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(.ie) a:hover {
  color: var(--ie-brand-deep);
  text-decoration: underline;
}

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

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

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

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

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

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

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

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

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

/* the test switcher: a pill holding a native select (index.js navigates) */
.ie-test {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ie-chip);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ie-ink);
  white-space: nowrap;
  cursor: pointer;
}

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

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

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

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

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

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

.ie-lang svg {
  flex: none;
}

.ie-lang select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--ie-ink);
  padding: 0 22px 0 2px;
  cursor: pointer;
  outline-offset: 4px;
  /* as wide as the design's six-language list, whatever this page offers */
  min-width: 90px;
}

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

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

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

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

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

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

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

.ie-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. */
.ie-mnav {
  display: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /* the menu button (44px) sets the bar's height, as in the design */
  .ie-hdr__bar {
    min-height: 80px;
    padding-right: calc(var(--ie-gutter) + 60px);
  }

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

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

  .ie-mnav {
    display: block;
  }
}

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

}

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

.ie-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(--ie-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. */
.ie-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;
}

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

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

.ie-side__list {
  gap: 4px;
}

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

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

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

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

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

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

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

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

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

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

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

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

.ie-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. */
.ie-chips,
.ie-premium--inline {
  display: none;
}

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

  .ie-side {
    display: none;
  }

  .ie-main {
    gap: 40px;
  }

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


  .ie-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(--ie-rule);
  }

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

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

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

.ie-hero {
  border-radius: 24px;
  background: linear-gradient(110deg, #e9f9fb 0%, #f1f5ff 60%, #f4f0ff 100%);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.ie-h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.4px;
  font-weight: 700;
  color: var(--ie-title);
  text-wrap: balance;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ol.ie-list--roman {
  list-style-type: lower-roman;
}

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

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

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

.ie-warn {
  color: #b45309;
}

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

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

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

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

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

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

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

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

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

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

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

.ie-faq__item[open] {
  background: #f6f8fd;
}

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

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

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

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

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

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

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

.ie-passage {
  /* content-box, as designed: 420px of text inside the padding */
  box-sizing: content-box;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--ie-line);
  padding: 20px 22px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.ie-box--text {
  display: block;
  font-size: 16px;
  color: var(--ie-ink);
}

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

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

.ie-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(--ie-soft);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.ie-cue__list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  line-height: 1.5;
}

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

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

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

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

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

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

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

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

.ie .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(--ie-brand);
}

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

/* calculators */
.ielts-tool {
  border-radius: 22px;
  background: var(--ie-tint);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ielts-tool h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ie-title);
}

.ielts-tool .hint {
  margin: -10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ie-muted);
}

.ielts-tool .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.ielts-tool label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ie-prose);
}

.ielts-tool input,
.ielts-tool select {
  border: 1px solid #d6dcef;
  border-radius: 12px;
  background: #fff;
  padding: 11px 14px;
  font-size: 16px;
  width: 150px;
  min-width: 150px;
  color: var(--ie-ink);
}

.ielts-tool select {
  width: auto;
  min-width: 120px;
}

.ielts-tool .out {
  border-radius: 16px;
  background: #fff;
  padding: 16px 20px;
}

.ielts-tool .band {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ie-brand);
}

.ielts-tool .band small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: var(--ie-prose);
}

/* --------------------------------------------------------------------------
   parts layout (speaking samples design): part headers, task-guide cards,
   topic carousels, question cards, cue card + notes, scoring blocks
   -------------------------------------------------------------------------- */

.ie-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ie-stats > span {
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.ie-stats > span > span {
  color: var(--ie-muted);
}

.ie-parthead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ie-parthead .ie-h2 {
  line-height: normal;
}

.ie-badge {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #634bf6, #4baef6);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ie-partpill {
  background: #e8f8fa;
  color: var(--ie-teal);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
}

.ie .ie-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: var(--ie-surface);
  padding: 14px 18px;
  color: var(--ie-ink);
}

.ie .ie-guide:hover {
  background: var(--ie-tint);
  color: var(--ie-ink);
  text-decoration: none;
}

.ie-guide__icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: #fff;
  color: var(--ie-brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ie-guide__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ie-guide__text b {
  font-size: 15.5px;
}

.ie-guide__text span {
  font-size: 14px;
  color: var(--ie-muted);
}

.ie-guide__go {
  margin-left: auto;
  flex: none;
  font-weight: 700;
  color: var(--ie-brand);
}

.ie-car,
.ie-car__panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.ie-car__panel[hidden] {
  display: none;
}

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

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

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

/* Without JavaScript every panel is on the page and the chips jump to them;
   the arrows only make sense once the script is switching panels. */
.ie-car:not(.is-js) .ie-car__arrow,
.ie-car:not(.is-js) .ie-car__pos {
  visibility: hidden;
}

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

.ie-car__chips::-webkit-scrollbar {
  display: none;
}

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

.ie .ie-car__chip:hover {
  text-decoration: none;
  color: var(--ie-ink);
}

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

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

.ie-car__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: -6px;
}

.ie-car__name {
  font-size: 14px;
  color: var(--ie-muted);
}

.ie-car__name b {
  color: var(--ie-ink);
}

.ie .ie-record {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ie-grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px 9px 12px;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 6px 16px rgba(99, 75, 246, 0.25);
}

.ie .ie-record:hover {
  filter: brightness(1.06);
  text-decoration: none;
  color: #fff;
}

.ie-record__mic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ie-record__tag {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 999px;
}

.ie-qcard {
  border: 1px solid var(--ie-line);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ie-qcard__q {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

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

.ie-qcard__q b {
  font-size: 17.5px;
  line-height: 1.45;
}

.ie-qcard__ans {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ie-qcard__ans[hidden],
.ie-answer__body[hidden] {
  display: none;
}

.ie-qcard__a {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ie-ink);
  background: #f6f8fc;
  border-radius: 14px;
  padding: 14px 16px;
}

.ie-qcard__why {
  margin: 0;
  font-size: 14.5px;
  color: var(--ie-teal);
  line-height: 1.5;
}

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

.ie-cuegrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.ie-notes {
  border-radius: 22px;
  border: 2px dashed #d6dcef;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ie-notes__eyebrow {
  margin: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ie-muted);
}

.ie-notes__hint {
  margin: 0;
  font-size: 15px;
  color: var(--ie-prose);
  line-height: 1.5;
}

.ie-notes__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ie-notes__chips span {
  background: #fff;
  border: 1px solid var(--ie-line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14.5px;
}

.ie-answer {
  border: 1px solid var(--ie-line);
  border-radius: 22px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ie-answer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ie-answer__head b {
  font-size: 18px;
}

.ie-answer__head span {
  font-size: 13px;
  color: var(--ie-muted);
}

.ie-answer__btn {
  margin-left: auto;
  border: 0;
  background: var(--ie-chip);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--ie-ink);
}

.ie-answer__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.ie-tip {
  border-radius: 18px;
  background: #e8f8fa;
  padding: 16px 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ie-teal);
}

.ie-tip p {
  margin: 0;
}

.ie-crits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.ie-crit {
  border-radius: 20px;
  background: #f6f8fc;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ie-crit__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ie-crit__head b {
  font-size: 17px;
  color: var(--ie-title);
}

.ie-crit__head span {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ie-brand-deep);
  background: #ece9fe;
  padding: 3px 9px;
  border-radius: 999px;
}

.ie-crit p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ie-prose);
}

.ie-calc {
  border-radius: 22px;
  background: var(--ie-tint);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ie-calc__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.ie-calc__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ie-calc__chip {
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
  white-space: nowrap;
}

.ie-calc__chip > span {
  color: var(--ie-muted);
}

.ie-calc__arrow {
  font-size: 18px;
  color: var(--ie-muted);
}

.ie-calc__result {
  background: var(--ie-grad);
  color: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.ie-calc__note {
  margin: 0;
  font-size: 14.5px;
  color: var(--ie-prose);
  line-height: 1.55;
}

.ie-bands {
  border: 1px solid var(--ie-line);
  border-radius: 22px;
  overflow: hidden;
}

.ie-bands__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--ie-line-soft);
  font-size: 15px;
  line-height: 1.5;
}

.ie-bands__row > span:nth-child(2) {
  color: var(--ie-ink);
}

.ie-bands__row > span:nth-child(3) {
  color: var(--ie-prose);
}

.ie-bands__row.ie-bands__head {
  padding: 14px 20px;
  border-top: 0;
  background: var(--ie-surface);
  font-weight: 700;
  font-size: 14px;
  line-height: normal;
}

.ie-bands__row.ie-bands__head > span {
  color: var(--ie-ink);
}

.ie-bands__n {
  font-weight: 700;
  font-size: 20px;
  color: var(--ie-brand-deep);
}

.ie-bandcards {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.ie-bandcard {
  border: 1px solid var(--ie-line);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ie-bandcard > b {
  font-size: 20px;
  color: var(--ie-brand-deep);
}

.ie-bandcard p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.ie-bandcard .ie-bandcard__g {
  font-size: 14.5px;
  color: var(--ie-prose);
}

/* page variant used by the samples pages in the parts layout */
.ie--parts .ie-main {
  gap: 56px;
}

.ie--parts .ie-sec {
  scroll-margin-top: 24px;
}

.ie--parts .ie-h2 {
  line-height: normal;
}

.ie--parts .ie-tabs {
  gap: clamp(12px, 2.5vw, 32px);
}

.ie--parts .ie-side .ie-premium__text {
  font-size: 14px;
}

.ie-side__sub--tasks {
  padding-top: 0;
}

.ie .ie-side__sub--tasks a {
  padding: 6px 12px;
  font-size: 14.5px;
}

.ie .ie-mnav__task {
  padding: 10px 14px 10px 30px;
  font-size: 15px;
  color: var(--ie-prose);
}

@media (max-width: 759.98px) {
  .ie--parts .ie-main {
    gap: 40px;
  }

  .ie--parts .ie-chips {
    margin-bottom: -24px;
  }

  .ie-car__pos {
    display: none;
  }

  .ie-bands {
    display: none;
  }

  .ie-bandcards {
    display: flex;
  }

  .ie--parts .ie-premium--inline {
    border-radius: 22px;
  }

  .ie--parts .ie-premium--inline .ie-premium__text {
    font-size: 15px;
  }

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

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

.ie-author__photo {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 2px #fff;
}

.ie-author__photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(circle, #000 62%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
  mask-image: radial-gradient(circle, #000 62%, rgba(0, 0, 0, 0.72) 78%, transparent 100%);
}

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

.ie-author__name {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  font-weight: 700;
  color: #1f2937;
}

.ie-author__bio {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  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. */
.ielts-cta-sticky {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

.ie .ielts-cta-sticky a {
  display: block;
  background: var(--ie-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);
}

.ie .ielts-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 .ielts-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;
}

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

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

.ie .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;
}

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

.ie .ts-footer__legal a:hover,
.ie .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;
}

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

.ie .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;
  }

  .ie .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;
  }
}

/* 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. */
.ie .ie-side a:hover,
.ie .ie-side .aside__list a:hover {
  text-decoration: none;
  color: var(--ie-brand);
}

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

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

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

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