/* TOEIC materials pages.
 *
 * The one stylesheet every page under tests/toeic/ loads. It started as a copy
 * of assets/ielts/ielts.css (same design system, tc- prefix instead of ie-);
 * scripts/toeic_redesign/ emits the class names used here. No utility framework, no runtime: the pages render
 * the same with JavaScript off, apart from the sample carousels.
 *
 * 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 {
  --tc-ink: #1d1d3a;
  --tc-title: #111;
  --tc-prose: #4b4d55;
  --tc-soft: #3f4250;
  --tc-muted: #6e7071;
  --tc-brand: #5e61f6;
  --tc-brand-deep: #634bf6;
  --tc-teal: #0f6f7c;
  --tc-grad: linear-gradient(90deg, #634bf6, #4baef6);
  --tc-surface: #f8f9fb;
  --tc-tint: #f1f5ff;
  --tc-chip: #f2f4f7;
  --tc-chip-hover: #e9ecf3;
  --tc-chip-on: #e4f6f8;
  --tc-line: #e6e9f2;
  --tc-line-soft: #eceef3;
  --tc-rule: #eef0f5;
  --tc-gutter: clamp(16px, 3vw, 32px);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tc-lang svg {
  flex: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  .tc-test {
    gap: 8px;
    padding: 6px 12px;
  }

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

  .tc-mnav {
    display: block;
  }
}

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

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

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

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

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

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

.tc-side__list {
  gap: 4px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  .tc-side {
    display: none;
  }

  .tc-main {
    gap: 40px;
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tc-warn {
  color: #b45309;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tc-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%;
}

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

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

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

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

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

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

.tc-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. */
.toeic-cta-sticky {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

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

.tc .toeic-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 .toeic-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;
}

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

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

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

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

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

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

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

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

/* ==========================================================================
   TOEIC: what the TOEIC pages need beyond the IELTS base above. Values are
   the owner's templates (others_design/tpl: ielts, toefl_new, det).
   ========================================================================== */

/* The pages still load the shared styles.css and the Tailwind CDN in <head>
   (kept unchanged); everything below is class-based so it wins over their
   element resets, and inline icons are put back inline. */
.tc .tc-ico,
.tc .tc-caret {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

.tc [hidden] {
  display: none !important;
}

/* header: the test switcher, as in the latest templates */
.tc-test {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--tc-chip);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
}

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

.tc-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #12b5c9; /* TOEIC accent of the main site's test select */
}

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

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

/* hero and headings at the template's sizes */
.tc-hero {
  border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
  gap: 10px;
}

.tc-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tc-h1 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.4px;
}

.tc-lead {
  font-size: 16.5px;
}

.tc-h2 {
  font-size: clamp(21px, 1.8vw, 24px);
}

.tc-h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--tc-title);
}

.tc-h4 {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tc-title);
}

.tc-sec__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.tc-blk {
  display: block;
}

.tc-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  min-width: 0;
}

.tc-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.tc .tc-list {
  padding-left: 22px;
}

.tc .tc-list li {
  padding-left: 2px;
}

.tc-table th {
  background: #f6f8fd;
}

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

/* cards: bordered (template "parts" cards) and tinted tiles */
.tc-card {
  border: 1px solid var(--tc-line);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  min-width: 0;
}

.tc-tile {
  border-radius: 22px;
  background: var(--tc-surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tc-tip {
  border-radius: 14px;
  background: #e8f8fa;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--tc-teal);
}

.tc-tip .tc-p,
.tc-tip .tc-list {
  color: var(--tc-teal);
  font-size: 15.5px;
}

/* "at a glance" strip: white tiles on a tinted band, value over label */
.tc-facts {
  border-radius: 22px;
  background: var(--tc-tint);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 6px;
}

.tc-fact {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.tc-fact__v {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tc-title);
  letter-spacing: -0.2px;
}

.tc-fact__k {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--tc-muted);
}

/* FAQ: one bordered card per question, answers open (template FAQ) */
.tc-faq-card {
  padding: 24px;
  border-radius: 22px;
  border-color: rgba(110, 112, 113, 0.2);
  gap: 16px;
}

.tc-faq-card .tc-h3 {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.25;
}

.tc-faq-card .tc-p {
  font-size: 18px;
  line-height: 1.5;
}

/* Q-cards (samples): heading as the small brand label, the instruction as
   the question, task material in a soft box */
.tc-qcard {
  border: 1px solid var(--tc-line);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.tc-qcard__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tc-brand-deep);
}

.tc-instr {
  display: block;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--tc-ink);
}

.tc-box {
  border-radius: 16px;
  background: var(--tc-surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* options keep the IELTS samples look (rule on the left, tint on hover);
   TOEIC's are text, not radio buttons */
.tc-opt {
  cursor: default;
  align-items: baseline;
}

.tc-opt__k {
  flex: none;
  font-weight: 700;
  color: var(--tc-brand);
}

/* audio.js fills both times; the markup has nothing between them */
.tc-audio .audio-current-time + .audio-duration::before {
  content: ' / ';
}

/* sample answers */
.tc-answer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 14px;
  background: #f6f8fc;
  padding: 14px 16px;
}

.tc-reveal__body .tc-p {
  color: var(--tc-ink);
}

.tc .tc-answer__text {
  border: 0;
  padding: 0;
}

.tc-reveal > summary {
  display: list-item;
}

/* "Check your response": the template's record-and-score button */
.tc .tc-try {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tc-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);
}

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

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

/* "Read more about ..." -> the template's task-guide link card */
.tc .tc-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: var(--tc-surface);
  padding: 14px 18px;
  color: var(--tc-ink);
}

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

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

.tc-guide__t {
  min-width: 0;
  font-weight: 700;
  font-size: 15.5px;
}

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

/* sample carousel: one Q-card at a time once toeic.js has run */
.tc-car {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.tc-car__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tc-surface);
  border-radius: 999px;
  padding: 6px;
  min-width: 0;
}

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

.tc .tc-car__btn:hover {
  color: var(--tc-brand);
}

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

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

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

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

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

.tc-car.is-live .tc-car__track > :not(.is-on) {
  display: none;
}

.tc-car__track {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* premium card: the page's own offer, with its countdown */
.tc-count {
  display: flex;
  gap: 6px;
}

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

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

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

/* blog: template post cards, cover band over title, text and link */
.tc-post {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--tc-line);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  padding-bottom: 20px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.tc-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(29, 29, 58, 0.08);
}

.tc-post > :not(.tc-post__cover) {
  margin: 0 20px;
}

.tc-post__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #634bf6 0%, #4baef6 100%);
  margin-bottom: 8px;
}

.tc-post:nth-child(2n) .tc-post__cover {
  background: linear-gradient(135deg, #0f6f7c 0%, #13a3b6 100%);
}

.tc-post__cover span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.tc-post__cover span:first-child {
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
}

.tc-post__cover span:last-child {
  left: -30px;
  bottom: -50px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
}

.tc-post__title {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--tc-title);
}

.tc-post__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--tc-prose);
}

.tc .tc-post__more {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--tc-brand);
}

.tc .tc-post__more::after {
  content: '';
  position: absolute;
  inset: 0;
}

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

  .tc-card,
  .tc-qcard,
  .tc-tile {
    padding: 18px;
  }
}

/* FAQ pages whose questions are h2 sections: one bordered card each */
.tc-sec--faq {
  padding: 24px;
  border: 1px solid rgba(110, 112, 113, 0.2);
  border-radius: 22px;
  gap: 16px;
}

.tc-sec--faq + .tc-sec--faq {
  margin-top: -28px;
}

.tc-sec--faq .tc-p {
  font-size: 18px;
  line-height: 1.5;
}

@media (max-width: 759.98px) {
  .tc-sec--faq {
    padding: 18px;
  }

  .tc-sec--faq + .tc-sec--faq {
    margin-top: -24px;
  }
}

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