/*
 * THP Guides. Ported from the guides page template; every rule is scoped under .thp-guides
 * so nothing leaks into the Elementor page or the theme. Selectors on buttons carry an element
 * type on purpose to win over theme/Elementor kit button styles.
 */

.thp-guides {
  --thp-guides-navy: #162D53;
  --thp-guides-ink: #414246;
  --thp-guides-muted: #7a7a7a;
  --thp-guides-line: #e4e4e4;
  --thp-guides-soft: #f7f7f7;
  --thp-guides-accent: #0090a5;
  --thp-guides-white: #FFFFFF;
  --thp-guides-font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --thp-guides-font-display: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --thp-guides-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --thp-guides-pad-y: 112px;

  font-family: var(--thp-guides-font);
  color: var(--thp-guides-navy);
  background: var(--thp-guides-white);
  text-align: left;
  min-width: 0;

  padding-bottom: 3rem;
}

.thp-guides .elementor-column-gap-default>.elementor-column>.elementor-element-populated {
  padding: 0;
}

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

.thp-guides :focus-visible {
  outline: 3px solid var(--thp-guides-accent);
  outline-offset: 2px;
}

/* ---------- Layout and header ---------- */

.thp-guides .thp-guides__wrap {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  /* Hero "Popular guides" scrolls here; set the variable (e.g. on .thp-guides) to the height of a sticky site header if it covers the tabs. */
  scroll-margin-top: var(--thp-guides-scroll-offset, 0px);
}

.thp-guides .thp-guides__header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.thp-guides .thp-guides__eyebrow {
  font-family: var(--thp-guides-font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--thp-guides-muted);
  text-transform: uppercase;
}

.thp-guides .thp-guides__heading {
  margin: 0;
  padding: 0;
  font-family: var(--thp-guides-font-display);
  font-weight: 800;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-transform: none;
  color: var(--thp-guides-navy);
}

.thp-guides .thp-guides__dot {
  display: inline-block;
  width: .3em;
  height: .3em;
  background: var(--thp-guides-accent);
  margin-left: .05em;
}

/* ---------- Filter tabs ---------- */

.thp-guides .thp-guides__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: var(--thp-guides-soft);
  align-self: center;
  max-width: 100%;
}

.thp-guides button.thp-guides__tab,
.thp-guides button.thp-guides__tab:hover,
.thp-guides button.thp-guides__tab:focus {
  margin: 0;
  padding: 11px 16px;
  min-height: 46px;
  width: auto;
  border-radius: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--thp-guides-navy);
  font-family: var(--thp-guides-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}

.thp-guides button.thp-guides__tab[aria-selected="true"] {
  background: var(--thp-guides-white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22, 45, 83, .12);
}

.thp-guides .thp-guides__tab-count {
  font-family: var(--thp-guides-font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--thp-guides-muted);
}

/* ---------- Card grid ---------- */

.thp-guides .thp-guides__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 18px;
}

.thp-guides .thp-guides__empty {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--thp-guides-ink);
}

.thp-guides button.thp-guides__card,
.thp-guides button.thp-guides__card:focus {
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  min-height: 0;
  text-align: left;
  border: 1px solid var(--thp-guides-line);
  background: var(--thp-guides-white);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--thp-guides-navy);
  font-family: var(--thp-guides-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  box-shadow: none;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  animation: thp-guides-fade-in .4s ease;
}

.thp-guides button.thp-guides__card:hover {
  background: var(--thp-guides-white);
  color: var(--thp-guides-navy);
  box-shadow: 0 18px 40px rgba(22, 45, 83, .10);
  transform: translateY(-2px);
  border-color: #c9d0da;
}

.thp-guides button.thp-guides__card[hidden] {
  display: none;
}

.thp-guides .thp-guides__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--thp-guides-soft);
  border-bottom: 1px solid var(--thp-guides-line);
  overflow: hidden;
}

.thp-guides .thp-guides__thumb .thp-guides__thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
}

.thp-guides .thp-guides__placeholder {
  position: absolute;
  inset: 12% 8%;
  background: var(--thp-guides-white);
  border: 1px solid var(--thp-guides-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 9%;
  padding: 7%;
}

.thp-guides .thp-guides__sk {
  display: block;
  background: #e9ecf0;
  border-radius: 4px;
}

.thp-guides .thp-guides__sk--title { height: 9%; width: 40%; }
.thp-guides .thp-guides__sk--line { height: 9%; width: 90%; }
.thp-guides .thp-guides__sk--line-short { height: 9%; width: 75%; }

.thp-guides .thp-guides__sk-row {
  display: flex;
  gap: 6%;
  height: 30%;
}

.thp-guides .thp-guides__sk-row .thp-guides__sk { flex: 1; }

.thp-guides .thp-guides__badges {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
}

.thp-guides .thp-guides__badge {
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.thp-guides .thp-guides__badge--new {
  background: var(--thp-guides-navy);
  color: var(--thp-guides-white);
}

.thp-guides .thp-guides__badge--done {
  background: var(--thp-guides-white);
  border: 1px solid var(--thp-guides-line);
  color: var(--thp-guides-navy);
}

.thp-guides .thp-guides__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--thp-guides-white);
  box-shadow: 0 6px 16px rgba(22, 45, 83, .18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thp-guides .thp-guides__play svg {
  display: block;
  fill: var(--thp-guides-navy);
}

.thp-guides .thp-guides__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.thp-guides .thp-guides__meta {
  font-family: var(--thp-guides-font-mono);
  font-size: 11px;
  color: var(--thp-guides-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.thp-guides .thp-guides__card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.thp-guides .thp-guides__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--thp-guides-ink);
}

/* ---------- Modal ----------
 * Every rule starts with the root chain .thp-guides.thp-guides-modal (the modal root carries both
 * classes, it is printed in the footer outside the card section), so each selector has at least
 * three classes and beats global theme / Elementor kit rules for button, h2, div without !important.
 */

.thp-guides.thp-guides-modal {
  --thp-guides-modal-font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --thp-guides-modal-mono: 'IBM Plex Mono', ui-monospace, monospace;
  /* Controls row under the frame: height and margin-top, used by the row and by the sizing formula. */
  --thp-guides-row-h: 36px;
  --thp-guides-row-gap: 12px;
  --thp-guides-overlay-pad: 24px;
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--thp-guides-overlay-pad);
  background: transparent;
  font-family: var(--thp-guides-modal-font);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}

.thp-guides.thp-guides-modal[hidden] {
  display: none;
}

.thp-guides.thp-guides-modal .thp-guides-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 43, .6);
}

/*
 * The dialog is as tall as its content (header + player); the overlay centers it. The scroll is
 * only a safety net: the player width below is chosen so the content fits the viewport.
 */
.thp-guides.thp-guides-modal .thp-guides-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: min(1240px, 100%);
  height: auto;
  max-height: calc(100vh - 2 * var(--thp-guides-overlay-pad));
  max-height: calc(100dvh - 2 * var(--thp-guides-overlay-pad));
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--thp-guides-white);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: thp-guides-fade-in .4s ease;
}

.thp-guides.thp-guides-modal .thp-guides-modal__head {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.thp-guides.thp-guides-modal .thp-guides-modal__titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.thp-guides.thp-guides-modal .thp-guides-modal__eyebrow {
  margin: 0;
  font-family: var(--thp-guides-modal-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--thp-guides-muted);
}

.thp-guides.thp-guides-modal h2.thp-guides-modal__title {
  margin: 0;
  padding: 0;
  font-family: var(--thp-guides-modal-font);
  font-size: 26px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.15;
  letter-spacing: normal;
  text-transform: none;
  color: var(--thp-guides-navy);
}

/* ---------- Modal buttons: reset completely, then style explicitly ---------- */

.thp-guides.thp-guides-modal button.thp-guides-modal__close,
.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin: 0;
  font-family: var(--thp-guides-modal-font);
  font-style: normal;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  color: var(--thp-guides-navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--thp-guides-line);
  border-radius: 8px;
  background: var(--thp-guides-white);
  font-size: 22px;
  line-height: 1;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  line-height: 1;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__close:hover,
.thp-guides.thp-guides-modal button.thp-guides-modal__close:active {
  background: var(--thp-guides-white);
  color: var(--thp-guides-navy);
  border-color: var(--thp-guides-navy);
}

.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn:hover,
.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn:active {
  background: var(--thp-guides-soft);
  color: var(--thp-guides-navy);
  border: 0;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__close:focus,
.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn:focus {
  outline: none;
  box-shadow: none;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__close:focus-visible,
.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn:focus-visible {
  outline: 3px solid var(--thp-guides-accent);
  outline-offset: 2px;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__close:disabled,
.thp-guides.thp-guides-modal button.thp-guides-modal__zoom-btn:disabled {
  opacity: .4;
  cursor: default;
  background: transparent;
}

/* ---------- Stage, player wrapper, frame ---------- */

/* Plain block below the header that wraps the player; no own height, no vertical centering. */
.thp-guides.thp-guides-modal .thp-guides-modal__stage {
  display: block;
  margin: 0;
  padding: 0;
}

/*
 * Frame + controls row. The frame height is width / aspect, so the width is limited to the viewport
 * height left for the frame: 100dvh minus --thp-guides-chrome-h (overlay and dialog padding,
 * header, gaps, controls row), measured by guides.js; 200px until it runs. --thp-guides-aspect is
 * a plain number (width / height) set by guides.js from the player's "ready" message; 16:10 before
 * "ready" and in the raw-iframe fallback.
 */
.thp-guides.thp-guides-modal .thp-guides-modal__player {
  display: flex;
  flex-direction: column;
  width: min(100%, max(0px, calc((100vh - var(--thp-guides-chrome-h, 200px)) * var(--thp-guides-aspect, 1.6))));
  width: min(100%, max(0px, calc((100dvh - var(--thp-guides-chrome-h, 200px)) * var(--thp-guides-aspect, 1.6))));
  margin: 0 auto;
  padding: 0;
}

.thp-guides.thp-guides-modal .thp-guides-modal__frame {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--thp-guides-aspect, 1.6);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 24px 60px rgba(22, 45, 83, .14);
}

/* Absolutely positioned so the iframe can never give the frame a height of its own. */
.thp-guides.thp-guides-modal iframe.thp-guides-modal__iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* ---------- Controls row: progress bar + zoom group ---------- */

.thp-guides.thp-guides-modal .thp-guides-modal__controls {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  height: var(--thp-guides-row-h);
  margin: var(--thp-guides-row-gap) 0 0;
  padding: 0;
  container-type: inline-size;
}

/* Without zoom support (group hidden, no .has-zoom) the bar takes the whole row. */
.thp-guides.thp-guides-modal .thp-guides-modal__controls:not(.has-zoom):not(.has-sound) {
  grid-template-columns: 1fr;
}

/* Raw iframe fallback only (player not normalized / no "ready"): no progress or zoom. */
.thp-guides.thp-guides-modal.is-fallback .thp-guides-modal__controls {
  display: none;
}

.thp-guides.thp-guides-modal .thp-guides-modal__progress {
  grid-column: 1;
  box-sizing: border-box;
  width: 100%;
  height: 6px;
  min-height: 4px;
  margin: 0;
  border-radius: 3px;
  background: var(--thp-guides-line);
  overflow: hidden;
}

.thp-guides.thp-guides-modal .thp-guides-modal__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--thp-guides-navy);
  transition: width .3s;
}

.thp-guides.thp-guides-modal .thp-guides-modal__tools {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mute toggle: same pill as the zoom group; the icon follows aria-pressed (true = muted). */
.thp-guides.thp-guides-modal .thp-guides-modal__sound {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--thp-guides-row-h);
  min-width: var(--thp-guides-row-h);
  height: var(--thp-guides-row-h);
  margin: 0;
  padding: 1px;
  border: 1px solid var(--thp-guides-line);
  border-radius: 8px;
  background: var(--thp-guides-white);
  box-shadow: 0 4px 14px rgba(22, 45, 83, .12);
}

.thp-guides.thp-guides-modal .thp-guides-modal__sound[hidden] {
  display: none;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  /* Square, same size as the zoom buttons: row height minus the group's 1px border and 1px padding. */
  width: calc(var(--thp-guides-row-h) - 4px);
  min-width: calc(var(--thp-guides-row-h) - 4px);
  height: calc(var(--thp-guides-row-h) - 4px);
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1;
  border-radius: 8px;
  color: var(--thp-guides-navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn:hover,
.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn:active {
  background: var(--thp-guides-soft);
}

.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn:focus-visible {
  outline: 3px solid var(--thp-guides-accent);
  outline-offset: 2px;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn svg.thp-guides-modal__sound-icon {
  flex: 0 0 auto;
  width: 22px;
  min-width: 22px;
  max-width: none;
  height: 22px;
  min-height: 22px;
  max-height: none;
  margin: 0;
  padding: 0;
}

.thp-guides.thp-guides-modal .thp-guides-modal__sound-icon--off,
.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn[aria-pressed="true"] .thp-guides-modal__sound-icon--on {
  display: none;
}

.thp-guides.thp-guides-modal button.thp-guides-modal__sound-btn[aria-pressed="true"] .thp-guides-modal__sound-icon--off {
  display: block;
}

.thp-guides.thp-guides-modal .thp-guides-modal__zoom {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  margin: 0;
  padding: 1px;
  border: 1px solid var(--thp-guides-line);
  border-radius: 8px;
  background: var(--thp-guides-white);
  box-shadow: 0 4px 14px rgba(22, 45, 83, .12);
}

.thp-guides.thp-guides-modal .thp-guides-modal__zoom[hidden] {
  display: none;
}

.thp-guides.thp-guides-modal .thp-guides-modal__zoom-label {
  min-width: 44px;
  margin: 0;
  text-align: center;
  font-family: var(--thp-guides-modal-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  color: var(--thp-guides-muted);
}

/* Tight row: drop the percent label first, keep the buttons. */
@container (max-width: 300px) {
  .thp-guides.thp-guides-modal .thp-guides-modal__zoom-label { display: none; }
}

/* ---------- Hero (heading + popular categories) ---------- */

/* 100vw includes the scrollbar width; clip the page overflow it would cause. */
body:has(.thp-guides__hero) {
  overflow-x: clip !important;
}

.thp-guides .thp-guides__hero {
  --thp-guides-font-hero: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  min-width: 0;
  /* content follows the container column; only the paper layer is full-bleed */
  margin: 0 0 var(--thp-guides-hero-gap, 0);
  font-family: var(--thp-guides-font-hero);
  color: var(--thp-guides-navy);
  background: transparent;
}

.thp-guides .thp-guides__hero-paper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#e3e8ee 1px, transparent 1px),
    linear-gradient(90deg, #e3e8ee 1px, transparent 1px),
    linear-gradient(#f0f3f6 1px, transparent 1px),
    linear-gradient(90deg, #f0f3f6 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
  mask-image: linear-gradient(180deg, #000 82%, transparent);
}

.thp-guides .thp-guides__hero .thp-guides__hero-inner {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 115px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 56px;
  align-items: center;
  background: transparent;
  box-shadow: none;
}

.thp-guides .thp-guides__hero--solo .thp-guides__hero-inner {
  grid-template-columns: minmax(0, 1fr);
}

.thp-guides .thp-guides__hero .thp-guides__hero-title {
  margin: 0;
  padding: 0;
  font-family: var(--thp-guides-font-hero);
  font-weight: 900;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-transform: none;
  color: var(--thp-guides-navy);
  background: transparent;
}

.thp-guides .thp-guides__hero-line { display: block; }
.thp-guides .thp-guides__hero-nowrap { white-space: nowrap; }

/* animated dot + cursor */
.thp-guides .thp-guides__hero-dot {
  position: relative;
  display: inline-block;
  width: .3em;
  height: .3em;
  margin-left: .05em;
}

.thp-guides .thp-guides__hero-square {
  position: absolute;
  inset: 0;
  background: var(--thp-guides-accent);
}

.thp-guides .thp-guides__hero-ring {
  position: absolute;
  inset: -.25em;
  border: 2px solid var(--thp-guides-accent);
  border-radius: 50%;
  opacity: 0;
  animation: thp-guides-hero-ring 4s ease-out infinite;
}

.thp-guides .thp-guides__hero-cursor {
  position: absolute;
  left: .55em;
  top: .55em;
  width: .42em;
  height: .6em;
  fill: var(--thp-guides-navy);
  stroke: var(--thp-guides-white);
  stroke-width: 1.2;
  animation: thp-guides-hero-cursor 4s cubic-bezier(.3, .7, .3, 1) infinite;
}

@keyframes thp-guides-hero-cursor {
  0%   { transform: translate(1.6em, 1.2em); opacity: 0; }
  15%  { opacity: 1; }
  40%  { transform: translate(0, 0); }
  45%  { transform: translate(0, 0) scale(.85); }
  50%  { transform: translate(0, 0) scale(1); }
  85%  { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}

@keyframes thp-guides-hero-ring {
  0%, 44% { opacity: 0; transform: scale(.4); }
  46%     { opacity: .9; transform: scale(.4); }
  70%     { opacity: 0; transform: scale(1.4); }
  100%    { opacity: 0; }
}

/* popular categories list */
.thp-guides .thp-guides__hero .thp-guides__hero-popular {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  justify-self: end;
  border-top: 2px solid var(--thp-guides-navy);
  background: transparent;
  box-shadow: none;
}

.thp-guides .thp-guides__hero .thp-guides__hero-label {
  padding: 14px 0 4px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--thp-guides-muted);
  background: transparent;
}

.thp-guides .thp-guides__hero a.thp-guides__hero-item,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:link,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:visited,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:hover,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:focus,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:active {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--thp-guides-line);
  font-size: 16px;
  font-weight: 700;
  color: var(--thp-guides-navy);
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}

.thp-guides .thp-guides__hero a.thp-guides__hero-item::after {
  content: "\2192";
  display: inline-block;
  margin-left: 8px;
  opacity: 0;
  transform: translateX(0);
  transition: transform .2s ease, opacity .2s ease;
}

.thp-guides .thp-guides__hero a.thp-guides__hero-item:hover,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:focus-visible {
  color: #0090a5;
}

.thp-guides .thp-guides__hero a.thp-guides__hero-item:hover::after,
.thp-guides .thp-guides__hero a.thp-guides__hero-item:focus-visible::after {
  opacity: 1;
  transform: translateX(4px);
}

.thp-guides .thp-guides__hero a.thp-guides__hero-item:focus-visible {
  outline: 3px solid #0090a5;
  outline-offset: 2px;
}

/* nowrap only when the column is wide enough for the 56px heading */
@media (min-width: 1100px) {
  .thp-guides .thp-guides__hero-line { white-space: nowrap; }
}

@media (max-width: 860px) {
  .thp-guides .thp-guides__hero .thp-guides__hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 72px 20px 64px;
  }

  .thp-guides .thp-guides__hero .thp-guides__hero-popular {
    max-width: none;
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thp-guides .thp-guides__hero a.thp-guides__hero-item::after { transition: none; }
  .thp-guides .thp-guides__hero a.thp-guides__hero-item:hover::after,
  .thp-guides .thp-guides__hero a.thp-guides__hero-item:focus-visible::after { transform: none; }
  .thp-guides .thp-guides__hero-cursor,
  .thp-guides .thp-guides__hero-ring { animation: none; }
  .thp-guides .thp-guides__hero-cursor { display: none; }
}

@keyframes thp-guides-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .thp-guides { --thp-guides-pad-y: 56px; }
  .thp-guides.thp-guides-modal h2.thp-guides-modal__title { font-size: 20px; }
}

@media (max-width: 767px) {
  .thp-guides.thp-guides-modal { --thp-guides-overlay-pad: 8px; }
  .thp-guides.thp-guides-modal .thp-guides-modal__dialog {
    width: 100%;
    padding: 16px;
    gap: 12px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thp-guides button.thp-guides__card,
  .thp-guides.thp-guides-modal .thp-guides-modal__dialog { animation: none; transition: none; }
  .thp-guides button.thp-guides__card:hover { transform: none; }
  .thp-guides.thp-guides-modal .thp-guides-modal__progress-bar { transition: none; }
}
