:root {
  --realis-paper: #fff8ef;
  --realis-plum: #322342;
  --realis-muted: #534662;
  --realis-link: #563287;
  --realis-white: #fff;
  --realis-on-purple: #f7f2ff;
  --realis-yellow: #fcde73;
  --realis-butter: #ffe7a9;
  --realis-pink: #f386a3;
  --realis-rose: #f3a5b8;
  --realis-orange: #fc9b57;
  --realis-lavender: #d9c9f0;
  --realis-lavender-wash: #f0e6f7;
  --realis-blue: #a7c4ee;
  --realis-blue-wash: #e7eefb;
  --realis-mint: #b6e2c6;
  --realis-peach: #fbe7d6;
}

body[data-realis-design] { --sun: var(--realis-yellow); }

body[data-realis-design="home"] .lp .lp-word { color: var(--realis-yellow); }

body[data-realis-design] .rl-header .rl-logo b { color: var(--realis-pink); }

body[data-realis-design="home"] .lp :is(.lp-lead, .lp-feed__lead, .lp-bridge__lead, .lp-topic__text, .lp-trust3__note, .lp-trust3__list li > span:last-child, .lp-exp .lp-glass__text, .lp-exp .lp-glass__meta) {
  color: var(--realis-on-purple);
}
body[data-realis-design="home"] .lp .lp-h2 { color: var(--realis-white); }
body[data-realis-design="home"] .lp .lp-exp .lp-h2 { color: var(--realis-white); }
body[data-realis-design="home"] .lp .lp-news .lp-h2 { color: #4f2c5b; }
body[data-realis-design="home"] .lp .lp-news__body .lp-text { color: var(--realis-muted); }
body[data-realis-design] .rl-footer :is(h2, a:not(.rl-logo):not(.rl-btn), .rl-small) { color: var(--realis-on-purple); }

body[data-realis-design="inner"] {
  --paper: var(--realis-paper);
  --paper-2: var(--realis-lavender-wash);
  --ink: var(--realis-plum);
  --ink-2: var(--realis-muted);
  --on-stage-2: var(--realis-on-purple);
  --partner: var(--realis-lavender-wash);
  --evidence-strong: var(--realis-mint);
  --evidence-limited: var(--realis-blue);
  --evidence-prelim: var(--realis-butter);
  --evidence-myth: var(--realis-rose);
  --line: #e1d4e5;
  --line-strong: #b9a8c4;
}

body[data-realis-design="inner"] :is(.ti-hero, .ab-hero, .cq-top, .q-stage, .p-hero) :is(h1, .rl-display-xl) {
  color: var(--realis-white);
}
body[data-realis-design="inner"] :is(.ti-hero, .ab-hero, .cq-top, .q-stage, .p-hero) .rl-lead { color: var(--realis-on-purple); }
body[data-realis-design="inner"] #q-h1 { color: var(--realis-white); }
body[data-realis-design="inner"] .p-hero .rl-display-xl { color: var(--realis-yellow); }
body[data-realis-design="inner"] .p-hero .rl-btn--sun {
  background: var(--realis-pink);
  color: var(--realis-plum);
  box-shadow: inset 0 2px #fff8, 0 18px 32px -14px #f386a38c;
}

body[data-realis-design="inner"] :is(.rl-answer, .a-main[data-topic] .rl-answer, [data-section="career"] .rl-answer) {
  background: var(--realis-blue-wash);
  color: var(--realis-plum);
}
body[data-realis-design="inner"] .a-main[data-topic="thinking"] .rl-answer :is(p, span:not(.rl-ev *), .rl-label, .rl-small, strong, a:not(.rl-ev)) {
  color: var(--realis-plum);
}
body[data-realis-design="inner"] :is(.rl-passport, .rl-callout--editorial, [data-section="career"] .rl-callout) {
  background: var(--realis-lavender-wash);
}
body[data-realis-design="inner"] .rl-callout--hypo { background: var(--realis-peach); }
body[data-realis-design="inner"] .rl-callout--help {
  background: var(--realis-blue-wash);
  border-color: #92a7cd;
}
body[data-realis-design="inner"] :is(.rl-callout__tag, .rl-notdx) {
  background: var(--realis-butter);
  color: var(--realis-plum);
}
body[data-realis-design="inner"] .rl-callout--editorial .rl-callout__tag { background: var(--realis-lavender); }
body[data-realis-design="inner"] .rl-callout--help .rl-callout__tag { background: var(--realis-blue); color: var(--realis-plum); }
body[data-realis-design="inner"] .rl-answer a:not(.rl-ev),
body[data-realis-design="inner"] .a-main[data-topic="thinking"] .rl-answer a:not(.rl-ev) { color: var(--realis-link); }
body[data-realis-design="inner"] :is(.rl-tag, .rl-chip)[data-topic] {
  --pb: var(--realis-lavender-wash);
  --pa: #946cbd;
  --pt: var(--realis-plum);
}
body[data-realis-design="inner"] :is(.rl-tag, .rl-chip)[data-topic="digital-habits"] {
  --pb: var(--realis-blue-wash);
  --pa: #6a88bf;
}
body[data-realis-design="inner"] :is(.rl-tag, .rl-chip)[data-topic="emotions"] {
  --pb: #fbe6ec;
  --pa: #b9577f;
}
body[data-realis-design="inner"] .q-tag { background: var(--realis-butter); color: var(--realis-plum); }
body[data-realis-design="inner"] :is(.rl-btn--primary, .rl-btn--primary:hover) { color: var(--realis-plum); background: var(--realis-pink); }
body[data-realis-design="inner"] .rl-status--draft { background: var(--realis-butter); }
body[data-realis-design="inner"] .rl-status--soon { background: var(--realis-blue); }
body[data-realis-design="inner"] .rl-status--active { background: var(--realis-mint); }
body[data-realis-design="inner"] .rl-status--revise { background: var(--realis-rose); }
body[data-realis-design="inner"] .rl-status--announce { background: var(--realis-lavender-wash); }
body[data-realis-design="inner"] .rl-practice--paper .rl-days li.done {
  color: var(--realis-plum);
  background: var(--realis-mint);
  border-color: var(--realis-mint);
}
body[data-realis-design="inner"] .rl-testres { background: var(--realis-lavender-wash); border-color: var(--line-strong); }
body[data-realis-design="inner"] .rl-news { background: var(--realis-peach) !important; }
body[data-realis-design="inner"] .rl-news .rl-h2 { color: #4f2c5b; }
body[data-realis-design="inner"] .rl-news .rl-input {
  background: #fffaf5;
  border-color: #ad697e86;
}
body[data-realis-design="inner"] .rl-news .rl-input:focus { border-color: #805088; }
body[data-realis-design="inner"] .rl-news :is(.rl-btn, .rl-btn[disabled]) {
  color: var(--realis-plum) !important;
  background: var(--realis-orange) !important;
  opacity: 1;
}
body[data-realis-design="inner"] .rl-news .rl-check input { accent-color: #805088; }
body[data-realis-design="inner"] .rl-news .rl-check a { color: var(--realis-link); }

body[data-realis-design="inner"] .rl-frame .cq-top .sa--banner img {
  object-position: center 16%;
  transform: none;
}
body[data-realis-design="inner"] .rl-frame .lt-hero + .sa--banner img,
body[data-realis-design="inner"] .rl-frame [data-section="career"] img[src*="realis-theme-law-"] {
  object-position: center 53%;
  transform: none;
}

/* Shared editorial layout for detail pages. */
.rd-hero {
  padding-block: clamp(24px, 3.2vw, 46px)
    calc(var(--radius-feature) + clamp(24px, 3.2vw, 46px));
}

.rd-hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.rd-hero__copy {
  display: grid;
  gap: clamp(12px, 1.3vw, 18px);
  min-width: 0;
  container-type: inline-size;
}

.rd-hero .rl-display-xl {
  color: var(--realis-white);
  font-size: clamp(2rem, 10cqi, 4.5rem);
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.rd-hero .rl-label { color: var(--realis-yellow); }
.rd-title-phrase { white-space: nowrap; }

.rd-hero .rl-lead {
  max-width: 46ch;
  color: var(--realis-on-purple);
  line-height: 1.5;
}

.rd-hero__art {
  width: min(100%, 280px);
  aspect-ratio: 1;
  justify-self: center;
  margin: 0;
  overflow: hidden;
  border-radius: clamp(24px, 3vw, 36px);
}

.rl-frame .rd-hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rd-body { padding-top: clamp(24px, 3.2vw, 40px); }
.rd-body .g-pass h2 { margin-bottom: var(--space-3); }

@media (min-width: 768px) {
  .rd-hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 36%); }
  .rd-hero__art { width: min(100%, 400px); justify-self: end; }
}

/* Directory cards and reading rhythm. */
body[data-realis-design="inner"] .rl-card--m .rl-card__excerpt { line-height: 1.5; }
body[data-realis-design="inner"] .rl-card--m .rl-card__tags { padding-top: var(--space-3); }
body[data-realis-design="inner"] .rl-tag[data-pair="thinking"] {
  --pb: var(--realis-lavender);
  --pa: #75559b;
  --pt: var(--realis-plum);
}

body[data-realis-design="inner"] .rl-tag[data-pair="attention"] {
  --pb: var(--realis-blue-wash);
  --pa: #5978ad;
  --pt: #2a416b;
}

/* Keep numbers intact and let descriptions wrap independently. */
a[href^="tel:"] { white-space: nowrap; }
.rl-phones { container-type: inline-size; }
.rl-frame .rl-phones a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  white-space: normal;
}
.rl-frame .rl-phones strong {
  white-space: nowrap;
  line-height: 1.25;
}
.rl-frame .rl-phones span { line-height: 1.45; }
@container (min-width: 440px) {
  .rl-frame .rl-phones a { grid-template-columns: 10rem minmax(0, 1fr); }
}

/* Right-align actions within their own blocks. */
.rl-frame :is(.c-guide__text, .c-quiz2__text, .c-split__head, .g2-cat__copy) > a:is(.rl-btn, .rl-arrow) {
  justify-self: end;
  margin-top: var(--space-2);
}
.rl-frame .lt-bill > a.rl-arrow { display: table; margin-inline-start: auto; }
.rd-action { text-align: end; }
.rl-frame :is(.g-res .acts, .m-sheet .acts) { justify-content: flex-end; }
.rl-frame .m-sheet .acts { justify-self: stretch; }
.rl-frame .g-submit > button { margin-inline-start: auto; }

.rl-frame .c-path__steps { margin-top: clamp(32px, 3.6vw, 48px); }
.rl-frame :is(.c-guide__text, .c-quiz2__text) { gap: var(--space-4); }
.rl-frame :is(.c-guide, .c-quiz2) h2 { line-height: 1.07; }
.rl-frame .c-split__head { gap: var(--space-3); }

/* The artwork and form share one continuous card on every page. */
.lp .lp-scene--news .lp-news.realis-news,
.rl-frame .rl-news.rl-news--compact.realis-news {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center;
  gap: 0;
  background: var(--realis-peach) !important;
}

.realis-news .realis-news__art {
  position: relative;
  grid-area: 1 / 1;
  align-self: stretch;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: inherit;
}

.realis-news .realis-news__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.lp .lp-scene--news .realis-news .lp-news__body,
.rl-frame .realis-news .rl-news__body {
  grid-area: 2 / 1;
  min-width: 0;
  padding: var(--space-5) clamp(20px, 4vw, 44px) clamp(24px, 4vw, 48px);
}

@media (min-width: 1024px) {
  .lp .lp-scene--news .lp-news.realis-news,
  .rl-frame .rl-news.rl-news--compact.realis-news {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
  }

  .lp .lp-scene--news .realis-news .lp-news__body,
  .rl-frame .realis-news .rl-news__body {
    grid-area: 1 / 2;
    padding: clamp(28px, 4vw, 52px) clamp(28px, 4vw, 52px) clamp(28px, 4vw, 52px) clamp(16px, 2.5vw, 36px);
  }
}

@media (min-width: 550px) and (max-width: 1023px) {
  .realis-news .realis-news__art {
    aspect-ratio: 1.15;
  }
}

.law-news {
  max-width: 34rem;
  margin: var(--space-7) auto;
  text-align: center;
  scroll-margin-top: 6rem;
}

.law-news form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.law-news__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: var(--space-2);
}

.law-news__row .rl-input { min-width: 0; }
.law-news__row .rl-btn { padding-inline: clamp(12px, 2.5vw, 24px); }
.law-news .rl-check { justify-self: center; text-align: start; }
.law-news .rl-btn:disabled { opacity: .65; }

/* Inner pages share a calm masthead, reading surface and form rhythm. */
[data-realis-design="inner"] .rd-hero {
  padding-block: clamp(20px, 2.3vw, 32px)
    calc(var(--radius-feature) + clamp(22px, 2.4vw, 36px));
}

[data-realis-design="inner"] .rd-hero__in { gap: clamp(20px, 3.5vw, 48px); }
[data-realis-design="inner"] .rd-hero__copy { gap: clamp(10px, 1.15vw, 16px); }

[data-realis-design="inner"] .rd-hero .rl-display-xl {
  font-size: clamp(1.75rem, 7.8cqi, 3.375rem);
  line-height: 1.06;
}

[data-realis-design="inner"] .rd-hero .rl-lead {
  max-width: 48ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

[data-realis-design="inner"] .rd-hero--experiment .rl-display-xl {
  color: var(--realis-white);
}

[data-realis-design="inner"] .rd-hero__art {
  width: min(100%, 245px);
  border-radius: clamp(24px, 3vw, 32px);
}

[data-realis-design="inner"] .rl-lift {
  background: var(--realis-paper);
}

[data-realis-design="inner"] .rl-lift > .rl-section:first-child {
  padding-top: clamp(28px, 3.4vw, 44px);
}

[data-realis-design="inner"] :is(.rd-questions, #test-form) { scroll-margin-top: 6rem; }

[data-realis-design="inner"] .rd-questions {
  padding-top: clamp(24px, 3vw, 40px);
}

[data-realis-design="inner"] .rd-questions :is(.cq-panel, .q-panel, .cq-res, .q-res) {
  padding: clamp(16px, 3vw, 32px);
  background: #fffaf5;
  border: 1px solid var(--line);
  box-shadow: none;
}

[data-realis-design="inner"] :is(.pd .rl-h1, main.rl-wrap > .rl-h1) {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

[data-realis-design="inner"] .rd-subscribe {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding: clamp(16px, 2.5vw, 28px);
  border-radius: var(--radius-feature);
  background: var(--realis-peach);
  scroll-margin-top: 6rem;
}

[data-realis-design="inner"] .rd-subscribe__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
}

[data-realis-design="inner"] .rd-subscribe__copy h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  line-height: 1.15;
}

[data-realis-design="inner"] .rd-subscribe__copy h2 span { display: block; }

[data-realis-design="inner"] .rd-subscribe__link {
  grid-column: 1 / -1;
  justify-self: center;
}

@media (min-width: 640px) {
  [data-realis-design="inner"] .rd-subscribe {
    grid-template-columns: 104px minmax(0, 1fr) auto;
  }

  [data-realis-design="inner"] .rd-subscribe__link {
    grid-column: 3;
    justify-self: end;
  }
}

@media (min-width: 768px) {
  [data-realis-design="inner"] .rd-hero__art {
    width: min(100%, 380px);
  }
}

/* Editorial credits sit at the start of the reading surface. */
/* One byline pattern for articles, practices and the tracker. */
[data-realis-design="inner"] :is(.rd-meta, .rd-date) {
  color: var(--realis-muted);
  font-size: .875rem;
  line-height: 1.45;
}

[data-realis-design="inner"] .rd-meta {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

/* Match the first content column while keeping the navigation aligned below the byline. */
[data-realis-design="inner"] .rd-meta:has(+ :is(.a-layout, .m-layout, .g2-layout)) {
  max-inline-size: var(--article);
}

@container rl (width >= 1024px) {
  [data-realis-design="inner"] .rd-meta:has(+ :is(.a-layout, .m-layout, .g2-layout)) {
    max-inline-size: min(var(--article), calc(100% - var(--rail) - var(--space-8)));
  }
}

[data-realis-design="inner"] .rd-meta:has(+ .g-main) { max-inline-size: 56rem; }

[data-realis-design="inner"] .rd-meta__author,
[data-realis-design="inner"] .rd-meta__dates {
  display: flex;
  align-items: center;
  gap: var(--space-1) var(--space-3);
}

[data-realis-design="inner"] .rd-meta__dates {
  flex-wrap: wrap;
  column-gap: var(--space-4);
}

[data-realis-design="inner"] .rd-meta__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--realis-plum);
  background: var(--realis-lavender);
  font-family: var(--font-display);
  font-weight: 700;
}

[data-realis-design="inner"] .rd-meta--timed {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3);
  align-items: center;
}

.rd-meta--timed .rd-meta__author { grid-area: 1 / 1; }
.rd-meta--timed .rd-meta__dates { grid-area: 2 / 1 / 3 / -1; }
.rd-meta--timed .rd-meta__duration { grid-area: 1 / 2; }

@media (min-width: 640px) {
  .rd-meta--timed .rd-meta__dates { grid-column: 1; }
  .rd-meta--timed .rd-meta__duration { grid-row: 1 / span 2; }
}

.rd-meta__duration {
  justify-self: end;
  width: fit-content;
  margin: 0;
  padding: .35rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--realis-lavender-wash);
  color: var(--realis-plum);
  font-weight: 600;
  white-space: nowrap;
}

[data-realis-design="inner"] .rd-meta--only { margin-bottom: var(--space-3); }

[data-realis-design="inner"] .rd-meta--standalone { padding-top: clamp(24px, 3.2vw, 40px); }
[data-realis-design="inner"] .rd-meta--standalone + .rl-section { padding-top: 0; }
[data-realis-design="inner"] .rd-body > .rl-wrap > .rd-subscribe { margin-block: var(--space-7); }

body[data-realis-design] a.rl-arrow {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: .18em;
}

body[data-realis-design] a.rl-arrow::after { content: none; }
body[data-realis-design] .rd-arrow__mark { margin-inline-start: .4em; }

body[data-realis-design="home"] .lp-feed__text .rd-arrow--on-stage {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-block-start: var(--space-5);
  margin-inline-start: auto;
  color: var(--realis-yellow);
}

body[data-realis-design="inner"] .rl-prose h2 {
  font-size: var(--realis-section-size);
  line-height: 1.2;
}

body[data-realis-design="inner"] :is(.rl-sources h2, .rl-related h2, #qm-t) {
  font-size: var(--realis-card-size);
  font-weight: 600;
  line-height: 1.3;
}

body[data-realis-design="inner"] .rl-btn:not(.rl-btn--sm) {
  min-height: 44px;
  font: 600 1rem / 1.2 var(--font-text);
}

/* The violet pill echoes the topic chips on the homepage. */
body[data-realis-design] .rl-header {
  background: rgb(110 86 215 / 96%);
  border-radius: 32px;
  box-shadow: 0 12px 28px -16px rgb(53 32 139 / 45%);
  backdrop-filter: blur(16px) saturate(1.2);
}

body[data-realis-design] .rl-header .rl-nav a:hover {
  color: var(--realis-white);
  background: rgb(22 9 71 / 16%);
}

body[data-realis-design] .rl-header :focus-visible {
  outline: 2px solid var(--realis-yellow);
  outline-offset: 3px;
}

body[data-realis-design] .rl-header .rl-menu-btn {
  inline-size: 84px;
  justify-content: center;
  padding-inline: 0;
  font-family: inherit;
  line-height: 1.2;
}

/* Shared hierarchy for editorial headings, cards and controls. */
body[data-realis-design="inner"] {
  --realis-section-size: clamp(1.5rem, 2.25vw, 2rem);
  --realis-card-size: clamp(1.125rem, 1.65vw, 1.375rem);
}

body[data-realis-design="inner"] :is(.rl-h2, .c-guide h2, .c-quiz2 h2) {
  font-family: var(--font-text);
  font-size: var(--realis-section-size);
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}

body[data-realis-design="inner"] .rl-h3 {
  font-size: var(--realis-card-size);
  line-height: 1.3;
}

body[data-realis-design="inner"] :is(.rl-link, .rl-arrow) {
  text-underline-offset: .18em;
}

body[data-realis-design="inner"] .rl-onpaper :is(.rl-link, .rl-btn--text),
body[data-realis-design="inner"] .rl-lift :is(.rl-link, .rl-btn--text) {
  color: var(--realis-link);
}

body[data-realis-design="inner"] :is(.c-guide__text, .c-quiz2__text, .c-split__head) {
  gap: var(--space-3);
}

body[data-realis-design="inner"] :is(form, .rd-subscribe) .rl-btn {
  min-height: 44px;
}

body[data-realis-design="inner"] form :is(input, textarea, select) {
  accent-color: var(--stage-deep);
}

/* Align card content and metadata with its reading column. */
body[data-realis-design] .rl-card { text-align: start; }
body[data-realis-design] .rl-card--m .rl-card__meta {
  justify-content: flex-start;
  padding-inline: 10px;
}

body[data-realis-design] .rl-card__tags {
  container-type: inline-size;
  justify-content: center;
  flex-wrap: nowrap;
}

body[data-realis-design] .rl-card__tags > .rl-tag {
  flex: none;
  white-space: nowrap;
}

body[data-realis-design] .rl-card__tags:has(> .rl-tag + .rl-tag) > .rl-tag {
  font-size: clamp(11px, 4.2cqi, 14px);
  padding-inline: clamp(3px, 1.4cqi, 7px);
}
body[data-realis-design] .rl-card--m .rl-card__title { text-wrap: pretty; }

body[data-realis-design] .rl-tag:is([data-pair="thinking"], [data-pair="attention"])::before {
  content: none;
}

body[data-realis-design] .rl-pull figcaption { text-align: end; }

body[data-realis-design] .rl-ev {
  display: flex;
  width: fit-content;
  margin-inline: auto 0;
}

body[data-realis-design] .rl-prose .rl-ev--inline { margin-top: var(--space-2); }

body[data-realis-design] .rl-answer__foot .rl-ev { order: 1; }

body[data-realis-design] .rl-table--evidence tr > :last-child { text-align: end; }

body[data-realis-design] .lp .lp-exp .lp-glass__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

body[data-realis-design] .rl-frame .rl-phones a { gap: 8px 24px; }

@container (min-width: 440px) {
  body[data-realis-design] .rl-frame .rl-phones a {
    grid-template-columns: minmax(max-content, 11rem) minmax(0, 1fr);
  }
}

body[data-realis-design] .rd-tracker-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

body[data-realis-design] .rd-tracker-actions .rl-btn { margin-inline-start: auto; }

body[data-realis-design="inner"] .rd-hero--text .rd-hero__in { grid-template-columns: minmax(0, 1fr); }
body[data-realis-design="inner"] .rd-hero--text .rd-hero__copy { max-width: 54rem; }

body[data-realis-design="inner"] .rd-legal__copy {
  max-width: 72ch;
  display: grid;
  gap: var(--space-5);
  padding-bottom: var(--space-8);
}

body[data-realis-design="inner"] .rd-legal__copy p { margin-top: var(--space-2); }

/* Keep the original handwriting on the four decorative hero labels. */
body[data-realis-design="home"] .lp .lp-note {
  font-family: "Caveat Hero", var(--font-hand);
}

body[data-realis-design="inner"] .rl-frame img.c-quiz2__img {
  width: 73%;
  margin-top: 10%;
  rotate: 7.5deg;
}

/* Numbered cards keep their number beside the copy at every width. */
[data-realis-design="inner"] :is(.p-rules, .rl-steps) > li {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(.75rem, 1.5vw, 1.25rem);
  align-items: start;
}

[data-realis-design="inner"] :is(.p-rules, .rl-steps) > li::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

[data-realis-design="inner"] .p-rules > li::before {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

[data-realis-design="inner"] .rl-steps > li::before { grid-row: 1 / span 3; }
[data-realis-design="inner"] :is(.p-rules, .rl-steps) > li > * { grid-column: 2; }

.lp .lp-material-time {
  display: block;
  margin-block-start: .15rem;
  color: var(--realis-on-purple);
  font-size: .8125rem;
  font-weight: 500;
}

/* Shared spacing for section labels, titles and introductory copy. */
.rl-frame .rd-section-intro {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.rl-frame .rd-section-intro > :is(h1, h2, p) { margin: 0; }
.rl-frame .rd-section-intro :is(.rl-label, .lp-bridge__kicker) { line-height: 1.25; }
.rl-frame .rd-section-intro:not(.rd-section-intro--stage) h2 { line-height: 1.2; }
.rl-frame .rd-section-intro__lead {
  max-width: 55ch;
  color: var(--realis-muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
}

.rl-frame .c-education__types { margin-block-start: var(--space-5); }
.rl-frame .c-education__card {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--realis-lavender-wash);
}
.rl-frame .c-education__card + .c-education__card { background: var(--realis-blue-wash); }
.rl-frame .c-education__card h3 {
  margin: 0;
  line-height: 1.25;
}
.rl-frame .c-education__card ul {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.rl-frame .c-education__card li {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  line-height: 1.5;
}
.rl-frame .c-education__card li strong { color: var(--realis-plum); }
.rl-frame .c-education__card li span { color: var(--realis-muted); }

[data-realis-design="inner"] .g-main .rl-matrix__head > span:first-child { text-align: center; }

/* Matte actions use the surface palette and retain primary and secondary emphasis. */
body[data-realis-design] .rl-frame {
  --realis-action-fill: var(--realis-orange);
  --realis-action-secondary: var(--realis-lavender-wash);
  --realis-action-secondary-ink: var(--realis-plum);
  --realis-action-focus: var(--realis-link);
}

body[data-realis-design] .rl-frame :is(.rl-stage, .rl-header, .rl-footer) {
  --realis-action-fill: var(--realis-yellow);
  --realis-action-secondary: #4e329f;
  --realis-action-secondary-ink: var(--realis-white);
  --realis-action-focus: var(--realis-white);
}

body[data-realis-design="home"] .rl-frame .lp-news {
  --realis-action-fill: var(--realis-orange);
  --realis-action-secondary: var(--realis-lavender-wash);
  --realis-action-secondary-ink: var(--realis-plum);
  --realis-action-focus: var(--realis-link);
}

/* Keep the editorial and experiment accent from the original palette. */
body[data-realis-design="inner"] .rl-frame :is(.rl-btn--primary, .p-hero .rl-btn--sun),
body[data-realis-design="home"] .rl-frame .lp-scene[data-scene="0"] .rl-btn--sun {
  --realis-action-fill: var(--realis-pink);
}

body[data-realis-design] .rl-frame :is(.rl-btn, .rl-menu-btn) {
  /* Legacy inline styles supply gradients, highlights and hover lifts. */
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background-color .3s ease, translate .3s ease, color .16s ease, border-color .16s ease;
}

body[data-realis-design] .rl-frame :is(.rl-btn--primary, .rl-btn--sun, .rl-btn--coral, .rd-subscribe__link):not(:is(:disabled, [aria-disabled="true"])) {
  background-color: var(--realis-action-fill);
  border-color: transparent;
  color: var(--realis-plum);
}

body[data-realis-design] .rl-frame :is(.rl-btn--primary, .rl-btn--sun, .rl-btn--coral, .rd-subscribe__link):not(:is(:disabled, [aria-disabled="true"])):is(:hover, :active) {
  background-color: color-mix(in srgb, var(--realis-action-fill), var(--realis-white) 10%);
}

body[data-realis-design] .rl-frame :is(.rl-btn--secondary, .rl-btn--ghost, .lp-btn--ghost, .rl-menu-btn):not(:is(:disabled, [aria-disabled="true"])) {
  background-color: var(--realis-action-secondary);
  border-color: transparent;
  color: var(--realis-action-secondary-ink);
}

body[data-realis-design] .rl-frame :is(.rl-btn--secondary, .rl-btn--ghost, .lp-btn--ghost, .rl-menu-btn):not(:is(:disabled, [aria-disabled="true"])):is(:hover, :active) {
  background-color: color-mix(in srgb, var(--realis-action-secondary), var(--realis-white) 10%);
}

body[data-realis-design] .rl-frame :is(.rl-btn, .rl-menu-btn):focus-visible {
  outline: 2px solid var(--realis-action-focus);
  outline-offset: 3px;
}

/* Match the feed cards: a 300 ms highlight and a short horizontal shift. */
@media (hover: hover) and (pointer: fine) {
  body[data-realis-design] .rl-frame .rl-btn--text:not(:is(:disabled, [aria-disabled="true"])):hover {
    background-color: color-mix(in srgb, var(--realis-action-focus) 10%, transparent);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body[data-realis-design] .rl-frame :is(.rl-btn, .rl-menu-btn):not(:is(:disabled, [aria-disabled="true"])):hover {
    translate: 6px 0;
  }
}

/* Let the experiment action receive pointer events above the stretched title link. */
body[data-realis-design="home"] .lp .lp-exp .rl-btn {
  position: relative;
  z-index: 1;
}

/* Match the email field and submit action on the homepage. */
body[data-realis-design="home"] .lp .lp-news__form > :is(input[type="email"], button.rl-btn) {
  block-size: 56px;
  min-block-size: 56px;
  padding-block: 0;
}

/* Match the scale and easing of the new-material cards on homepage illustrations. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lp :is(.lp-bridge__img, .lp-scene[data-scene="0"] .lp-art > img, .realis-news__art > img) {
    transition: scale .4s cubic-bezier(.34, 1.56, .64, 1);
  }

  .lp :is(.lp-bridge__img:hover, .lp-scene[data-scene="0"] .lp-art:hover > img, .realis-news__art:hover > img) {
    scale: 1.03;
  }
}

/* Compare education paths in a table, with labeled rows on narrow columns. */
[data-realis-design="inner"] .rd-edu {
  container: education / inline-size;
  margin-block-start: var(--space-4);
}

[data-realis-design="inner"] .rd-edu__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fffaf5;
  color: var(--realis-plum);
  font-size: .9375rem;
  line-height: 1.45;
  text-align: start;
}

.rd-edu__path { width: 27%; }
.rd-edu__audience { width: 35%; }
.rd-edu__duration { width: 15%; }
.rd-edu__document { width: 23%; }

.rd-edu__table caption {
  padding-block-end: var(--space-2);
  color: var(--realis-muted);
  font-size: .875rem;
  line-height: 1.45;
  text-align: start;
}

.rd-edu__table :is(th, td) {
  padding: .8rem .6rem;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.rd-edu__table thead th { background: var(--realis-lavender-wash); }
.rd-edu__table thead th:first-child { border-start-start-radius: var(--radius-card); }
.rd-edu__table thead th:last-child { border-start-end-radius: var(--radius-card); }
.rd-edu__group th {
  padding-block: .55rem;
  background: var(--realis-blue-wash);
  color: var(--realis-link);
  font-size: .8125rem;
  font-weight: 700;
}

.rd-edu__option:nth-child(odd) { background: #f7f0f8; }

.rd-edu__time {
  display: inline-block;
  padding: .2em .45em;
  border-radius: 8px;
  background: var(--realis-lavender-wash);
  font-weight: 650;
}

.rd-edu__mobile-label { display: none; }

.rd-edu__sources { margin-block-start: var(--space-3); }

.rd-edu__extra {
  display: grid;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--realis-lavender-wash);
}

.rd-edu__extra p {
  margin: 0;
  color: var(--realis-muted);
  font-size: .9375rem;
  line-height: 1.5;
}

[data-realis-design="inner"] .g2-main #p1 { scroll-margin-block-start: 6rem; }

@container education (width < 640px) {
  [data-realis-design="inner"] .rd-edu__table {
    display: grid;
    gap: var(--space-3);
    border: 0;
    background: transparent;
  }

  .rd-edu__table caption { padding-block-end: 0; }
  .rd-edu__table colgroup { display: none; }
  .rd-edu__table thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .rd-edu__table tbody,
  .rd-edu__table tbody tr { display: grid; }
  .rd-edu__table tbody { gap: var(--space-2); }
  .rd-edu__group th { border-radius: 10px; }

  .rd-edu__option {
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-input);
    background: #fffaf5;
  }

  .rd-edu__table .rd-edu__option :is(th, td) { padding: 0; }
  .rd-edu__option th { font-size: 1rem; }
  .rd-edu__option td {
    display: grid;
    grid-template-columns: minmax(5.25rem, .8fr) minmax(0, 1.6fr);
    gap: var(--space-2);
    align-items: start;
  }

  .rd-edu__mobile-label {
    display: block;
    color: var(--realis-muted);
    font-size: .8125rem;
    font-weight: 650;
  }
}

/* An illustrated overview leads to the guide's detailed comparison. */
.rd-edu-choice {
  display: grid;
  gap: var(--space-5);
  margin-block-start: var(--space-6);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 40px;
  background: var(--realis-lavender-wash);
}

.rd-edu-choice__visual {
  display: grid;
  place-items: center;
  padding: var(--space-3);
}

.rd-edu-choice__visual img {
  display: block;
  width: min(100%, 180px);
  height: auto;
  border-radius: 28px;
  transform: rotate(-6deg);
}

.rd-edu-choice__routes {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-edu-choice__routes > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.rd-edu-choice__number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--realis-butter);
  color: var(--realis-plum);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}

.rd-edu-choice__routes li:nth-child(2) .rd-edu-choice__number { background: var(--realis-rose); }
.rd-edu-choice__routes li:nth-child(3) .rd-edu-choice__number { background: var(--realis-blue); }

.rd-edu-choice__routes h3 {
  margin: 0;
  color: var(--realis-plum);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
}

.rd-edu-choice__routes p,
.rd-edu-choice__action p {
  margin: var(--space-2) 0 0;
  color: var(--realis-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.rd-edu-choice__action {
  display: grid;
  gap: var(--space-5);
}

.rd-edu-choice__action p { margin: 0; max-width: 44ch; }

body[data-realis-design] .rd-edu-choice .rd-edu-choice__button {
  justify-self: start;
  max-width: 100%;
  gap: var(--space-3);
  background: var(--realis-pink);
  color: var(--realis-plum);
  text-align: center;
}

.c-education > .rd-edu__extra {
  margin-block-start: var(--space-5);
  padding: var(--space-5);
  background: var(--realis-peach);
}

.rd-edu__option { scroll-margin-block-start: 6rem; }
.rd-edu__option:target { background: var(--realis-blue-wash); }

@media (min-width: 640px) {
  .rd-edu-choice { grid-template-columns: minmax(180px, .8fr) minmax(0, 1.5fr); }
  .rd-edu-choice__visual img { width: min(100%, 320px); }
  .rd-edu-choice__action { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

@media (min-width: 1000px) {
  .rd-edu-choice { column-gap: var(--space-8); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .rd-edu-choice__visual img { transition: scale .4s cubic-bezier(.34, 1.56, .64, 1); }
  .rd-edu-choice__visual img:hover { scale: 1.03; }
}

/* Keep the article contents below the fixed site header. */
body[data-realis-design="inner"] .a-rail-inner { top: 6rem; }

/* Let related material titles fit the narrowest reading column. */
body[data-realis-design="inner"] .rl-related { grid-template-columns: minmax(0, 1fr); }
body[data-realis-design="inner"] .rl-related .rl-card__link { overflow-wrap: anywhere; }


/* A short observation sequence, with each number beside its text. */
.rl-prose .rd-observe {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: 0;
  list-style: none;
  counter-reset: observation;
}
.rl-prose .rd-observe > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: var(--space-3);
  align-content: start;
  margin: 0;
  padding: var(--space-4);
  border-radius: 20px;
  background: var(--realis-lavender-wash);
  counter-increment: observation;
}
.rl-prose .rd-observe > li::before {
  content: counter(observation);
  display: grid;
  place-items: center;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--realis-lavender);
  color: var(--realis-plum);
  font-weight: 700;
  line-height: 1;
}
.rl-prose .rd-observe > li > div { min-width: 0; }
.rl-prose .rd-observe strong { display: block; margin-block-end: var(--space-2); }
@media (min-width: 640px) {
  .rl-prose .rd-observe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep source headings and cited references clear of the fixed header. */
body[data-realis-design="inner"] .rl-sources,
body[data-realis-design="inner"] .rl-sources li[id] { scroll-margin-block-start: 6rem; }
