:root {
  --rt-ink: #1b2559;
  --rt-muted: #4a5568;
  --rt-soft: #707eae;
  --rt-paper: #f4f7fe;
  --rt-paper-2: #e9edf7;
  --rt-white: #ffffff;
  --rt-line: rgba(27, 37, 89, 0.1);
  --rt-brand: #422afb;
  --rt-brand-dark: #3311db;
  --rt-brand-soft: #e9e3ff;
  --rt-shadow: 0 18px 50px rgba(112, 144, 176, 0.12);
  --rt-radius: 18px;
  --rt-max: 1120px;
  --rt-font: "DM Sans", system-ui, sans-serif;
  --rt-display: "Fraunces", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body.rt-body {
  margin: 0;
  min-height: 100vh;
  color: var(--rt-ink);
  font-family: var(--rt-font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(66, 42, 251, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(134, 140, 255, 0.22), transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, var(--rt-paper) 40%, #eef2ff 100%);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rt-brand-dark);
}

.rt-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10000;
}

.rt-skip:focus {
  left: 1rem;
  top: 1rem;
}

.rt-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.rt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 246, 0.86);
  border-bottom: 1px solid var(--rt-line);
}

.rt-header__inner,
.rt-hero__inner,
.rt-panel,
.rt-steps__inner,
.rt-detail,
.rt-howto,
.rt-related,
.rt-faq,
.rt-breadcrumbs,
.rt-footer__inner {
  width: min(var(--rt-max), calc(100% - 2rem));
  margin-inline: auto;
}

.rt-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.rt-brand {
  display: inline-flex;
  align-items: center;
}

.rt-brand__logo--desktop {
  display: none;
  height: 36px;
  width: auto;
}

.rt-brand__logo--mobile {
  display: block;
  height: 36px;
  width: auto;
}

@media (min-width: 768px) {
  .rt-brand__logo--desktop {
    display: block;
  }
  .rt-brand__logo--mobile {
    display: none;
  }
}

.rt-header__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rt-link {
  color: var(--rt-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.rt-link:hover {
  color: var(--rt-ink);
}

.rt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.rt-btn:hover {
  transform: translateY(-1px);
}

.rt-btn--primary {
  background: var(--rt-brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(66, 42, 251, 0.25);
}

.rt-btn--primary:hover {
  background: var(--rt-brand-dark);
  color: #fff;
}

.rt-btn--secondary {
  background: var(--rt-ink);
  color: #fff;
}

.rt-btn--ghost {
  background: transparent;
  color: var(--rt-ink);
  border: 1px solid var(--rt-line);
}

.rt-btn--lg {
  padding: 0.9rem 1.4rem;
  font-size: 1.02rem;
}

.rt-hero {
  position: relative;
  padding: 2.5rem 0 1.5rem;
  overflow: hidden;
}

.rt-hero__glow {
  position: absolute;
  inset: 10% 20% auto;
  height: 180px;
  background: radial-gradient(circle, rgba(66, 42, 251, 0.18), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.rt-hero__inner {
  position: relative;
  padding: 1.25rem 0 0.5rem;
  animation: rt-rise 700ms ease both;
}

.rt-eyebrow {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-family: var(--rt-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--rt-brand-dark);
}

.rt-hero__title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--rt-display);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.rt-hero__lede {
  margin: 1rem 0 0;
  max-width: 38rem;
  color: var(--rt-muted);
  font-size: 1.08rem;
}

.rt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.rt-panel {
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--rt-line);
  border-radius: calc(var(--rt-radius) + 6px);
  box-shadow: var(--rt-shadow);
  animation: rt-rise 800ms ease 80ms both;
}

.rt-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.rt-search {
  display: flex;
  flex: 1 1 280px;
  gap: 0.5rem;
}

.rt-search__input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  border: 1px solid var(--rt-line);
  border-radius: 999px;
  padding: 0 1rem;
  font: inherit;
  font-size: 1rem;
  background: var(--rt-white);
  color: var(--rt-ink);
}

.rt-search__input:focus {
  outline: 2px solid rgba(66, 42, 251, 0.35);
  border-color: var(--rt-brand);
}

.rt-clear {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rt-soft);
}

.rt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rt-filters--tags {
  display: none;
}

@media (min-width: 768px) {
  .rt-filters--tags {
    display: flex;
  }
}

.rt-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--rt-brand-soft);
  color: var(--rt-brand-dark);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.rt-chip:hover,
.rt-chip.is-active {
  background: var(--rt-brand);
  color: #fff;
}

.rt-chip--muted {
  background: var(--rt-paper-2);
  color: var(--rt-muted);
}

.rt-chip--muted.is-active,
.rt-chip--muted:hover {
  background: var(--rt-ink);
  color: #fff;
}

.rt-count {
  margin: 0.25rem 0 1rem;
  color: var(--rt-soft);
  font-size: 0.95rem;
}

.rt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

@media (min-width: 768px) {
  .rt-grid {
    gap: 0.75rem;
  }
}

@media (min-width: 1100px) {
  .rt-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .rt-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rt-card {
  display: flex;
  flex-direction: column;
  background: var(--rt-white);
  border: 1px solid var(--rt-line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 16px rgba(27, 37, 89, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: rt-rise 700ms ease both;
}

.rt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(27, 37, 89, 0.1);
}

.rt-card__media {
  background: #eef2ff;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.rt-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.rt-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem 0.5rem 0.55rem;
}

@media (min-width: 768px) {
  .rt-card__body {
    gap: 0.35rem;
    padding: 0.65rem 0.7rem 0.75rem;
  }
}

.rt-card__title {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .rt-card__title {
    font-size: 0.92rem;
  }
}

.rt-card__blurb {
  margin: 0;
  color: var(--rt-soft);
  font-size: 0.68rem;
  display: none;
}

@media (min-width: 768px) {
  .rt-card__blurb {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.82rem;
  }
}

.rt-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(66, 42, 251, 0.1);
  color: var(--rt-brand-dark);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .rt-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.5rem;
  }
}

.rt-empty {
  text-align: center;
  padding: 2.5rem 1rem;
}

.rt-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-weight: 600;
}

.rt-steps,
.rt-howto,
.rt-related,
.rt-faq {
  margin: 2rem auto 3rem;
}

.rt-section-title {
  margin: 0 0 1rem;
  font-family: var(--rt-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.rt-steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 800px) {
  .rt-steps__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.rt-steps__list li {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rt-line);
  border-radius: var(--rt-radius);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rt-steps__list strong {
  font-size: 1.05rem;
}

.rt-steps__list span {
  color: var(--rt-muted);
  font-size: 0.95rem;
}

.rt-breadcrumbs {
  padding: 1.25rem 0 0.25rem;
}

.rt-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--rt-soft);
  font-size: 0.92rem;
}

.rt-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--rt-line);
}

.rt-breadcrumbs a {
  color: var(--rt-muted);
  text-decoration: none;
  font-weight: 600;
}

.rt-detail {
  display: grid;
  gap: 1rem;
  padding: 0.75rem 0 2rem;
  animation: rt-rise 650ms ease both;
  grid-template-columns: 1fr;
  grid-template-areas:
    "intro"
    "preview"
    "body";
}

.rt-detail__intro {
  grid-area: intro;
}

.rt-detail__preview {
  grid-area: preview;
}

.rt-detail__body {
  grid-area: body;
}

@media (min-width: 900px) {
  .rt-detail {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas:
      "intro preview"
      "body preview";
    align-items: start;
    gap: 1.5rem 2rem;
  }

  .rt-detail__preview {
    position: sticky;
    top: 5.25rem;
  }
}

.rt-detail__title {
  margin: 0.55rem 0 0;
  font-family: var(--rt-display);
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.rt-detail__lede {
  margin: 0.7rem 0 0;
  color: var(--rt-muted);
  font-size: 1.02rem;
  max-width: 36rem;
}

.rt-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.rt-prose {
  color: var(--rt-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.rt-prose p {
  margin: 0 0 0.9rem;
}

.rt-prose ul {
  margin: 0 0 0.9rem;
  padding-left: 1.2rem;
}

.rt-prose li {
  margin: 0.25rem 0;
}

.rt-about {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 900px) {
  .rt-about {
    margin-top: 0.35rem;
  }
}

.rt-about__title {
  margin: 0 0 0.75rem;
  font-family: var(--rt-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--rt-ink);
}

.rt-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.rt-note {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--rt-brand);
  background: rgba(66, 42, 251, 0.06);
  color: var(--rt-muted);
  font-size: 0.92rem;
}

.rt-preview {
  position: relative;
  display: block;
  border-radius: calc(var(--rt-radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--rt-line);
  background: #eef2ff;
  box-shadow: var(--rt-shadow);
}

.rt-preview img {
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  object-position: top center;
  background: #fff;
}

@media (min-width: 900px) {
  .rt-preview img {
    max-height: 78vh;
  }
}

.rt-preview__cta {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: rgba(27, 37, 89, 0.88);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.rt-howto p,
.rt-faq p {
  color: var(--rt-muted);
  max-width: 48rem;
}

.rt-faq__list {
  display: grid;
  gap: 0.65rem;
}

.rt-faq details {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--rt-line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.rt-faq summary {
  cursor: pointer;
  font-weight: 700;
}

.rt-faq details p {
  margin: 0.65rem 0 0.15rem;
}

.rt-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--rt-line);
  background: rgba(27, 37, 89, 0.94);
  color: rgba(255, 255, 255, 0.82);
}

.rt-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.rt-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.rt-footer__inner {
  padding: 2.5rem 0 2rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .rt-footer__inner {
    grid-template-columns: 1.3fr 1fr;
  }
}

.rt-footer__brand strong {
  display: block;
  font-family: var(--rt-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.rt-footer__brand p {
  margin: 0;
  max-width: 28rem;
}

.rt-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rt-footer__heading {
  margin: 0 0 0.55rem;
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rt-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.rt-footer__legal,
.rt-footer__copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.62);
}

@keyframes rt-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rt-hero__inner,
  .rt-panel,
  .rt-card,
  .rt-detail,
  .rt-btn {
    animation: none !important;
    transition: none !important;
  }
}
