/* Materials redesign: the design system of the redesigned materials pages.
 *
 * Written for the TOEFL 2026 pages, from the IELTS redesign's stylesheet
 * (assets/ielts/ielts.css, which IELTS keeps using for now; the two are meant
 * to be unified), with neutral rd- class names. Loaded before the test's own
 * stylesheet (assets/toefl/toefl.css).
 * It holds what the tests have in common: tokens, base, the header and its
 * phone menu, the sidebar frame with its Premium card, the hero, sections,
 * text blocks, tables, notes, cards, FAQ, the author box, the floating
 * mock-test button and the static copy of the main site's footer.
 * scripts/redesign_common.py emits the markup these classes style.
 *
 * Written by hand, no utility framework, no runtime. Breakpoints follow the
 * design: the header collapses into a menu below 1060px, and the sidebar gives
 * way to the single column 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 {
  --rd-ink: #1d1d3a;
  --rd-title: #111;
  --rd-prose: #4b4d55;
  --rd-soft: #3f4250;
  --rd-muted: #6e7071;
  --rd-brand: #5e61f6;
  --rd-brand-deep: #634bf6;
  --rd-teal: #0f6f7c;
  --rd-grad: linear-gradient(90deg, #634bf6, #4baef6);
  --rd-surface: #f8f9fb;
  --rd-tint: #f1f5ff;
  --rd-chip: #f2f4f7;
  --rd-chip-hover: #e9ecf3;
  --rd-chip-on: #e4f6f8;
  --rd-line: #e6e9f2;
  --rd-line-soft: #eceef3;
  --rd-rule: #eef0f5;
  --rd-gutter: clamp(16px, 3vw, 32px);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.rd-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--rd-chip);
  border-radius: 999px;
  font-size: 14px;
  color: var(--rd-ink);
  white-space: nowrap;
}

.rd-pill b {
  font-weight: 700;
}

.rd-pill__sub {
  color: var(--rd-muted);
}

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

/* Test switcher: a select in the header pill; each option's value is the
   page it opens (the other test's materials for the same skill). */
.rd-testsel {
  cursor: pointer;
}

.rd-testsel:hover {
  background: var(--rd-chip-hover);
}

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

.rd-testsel .rd-caret {
  margin-left: -22px;
  pointer-events: none;
}

.rd-dot--ink {
  background: var(--rd-ink);
}

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

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

.rd-lang svg {
  flex: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  .rd-pill {
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .rd-pill .rd-dot {
    width: 6px;
    height: 6px;
  }

  .rd-pill__sub {
    display: none;
  }

  .rd-mnav {
    display: block;
  }
}

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

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

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

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

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

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

.rd-side__list {
  gap: 4px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  .rd-side {
    display: none;
  }

  .rd-main {
    gap: 40px;
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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