/* Unifold editorial system for the indexed pages that predate the current landing page. */

html:has(body[data-tdai-refresh="unifold-4"]) {
  min-width: 20rem;
  background: var(--td-colour-warm-white);
  scroll-behavior: auto;
}

body[data-tdai-refresh="unifold-4"] {
  --tdai-shell: min(76rem, calc(100% - clamp(2rem, 7vw, 5.5rem)));
  --tdai-reading: min(46rem, calc(100% - clamp(2rem, 7vw, 5.5rem)));
  min-width: 20rem;
  margin: 0;
  overflow-x: clip !important;
  background: var(--td-colour-warm-white) !important;
  color: var(--td-colour-carbon) !important;
  font-family: var(--td-font-body) !important;
  font-size: 1rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-tdai-refresh="unifold-4"]::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 2px;
  background: var(--td-colour-violet);
  pointer-events: none;
}

body[data-tdai-refresh="unifold-4"] *,
body[data-tdai-refresh="unifold-4"] *::before,
body[data-tdai-refresh="unifold-4"] *::after {
  animation: none !important;
}

body[data-tdai-refresh="unifold-4"] :is(img, svg, video, canvas) {
  max-width: 100%;
}

body[data-tdai-refresh="unifold-4"] :where(p, li, blockquote, figcaption, dt, dd, label) {
  color: var(--td-text-secondary) !important;
  font-family: var(--td-font-body) !important;
  line-height: 1.625;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

body[data-tdai-refresh="unifold-4"] :where(h1, h2, h3, h4, h5, h6, .font-heading) {
  color: var(--td-colour-carbon) !important;
  font-family: var(--td-font-display) !important;
  font-style: normal !important;
  text-wrap: balance;
}

body[data-tdai-refresh="unifold-4"] h1 {
  max-width: 15ch;
  font-size: clamp(2.75rem, 5.5vw, 5.5rem) !important;
  font-weight: 500 !important;
  letter-spacing: -0.052em !important;
  line-height: 0.98 !important;
}

body[data-tdai-refresh="unifold-4"] h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.4rem) !important;
  font-weight: 550 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
}

body[data-tdai-refresh="unifold-4"] h3 {
  font-weight: 600 !important;
  letter-spacing: -0.018em !important;
  line-height: 1.16 !important;
}

body[data-tdai-refresh="unifold-4"] :where(a) {
  color: var(--td-text-link) !important;
  text-underline-offset: 0.2em;
}

body[data-tdai-refresh="unifold-4"] :where(a, button, input, textarea, select, summary) {
  font-family: var(--td-font-body) !important;
}

body[data-tdai-refresh="unifold-4"] :where(a, button, summary) {
  transition-property: color, background-color, border-color, transform !important;
  transition-duration: var(--td-duration-fast) !important;
  transition-timing-function: var(--td-ease-standard) !important;
}

@media (hover: hover) and (pointer: fine) {
  body[data-tdai-refresh="unifold-4"] :where(a, button):hover {
    transform: translateY(-1px);
  }
}

body[data-tdai-refresh="unifold-4"] :where(a, button):active {
  transform: translateY(1px) scale(0.98) !important;
}

body[data-tdai-refresh="unifold-4"] :focus-visible {
  outline: var(--td-focus-ring-width) solid var(--td-focus-ring) !important;
  outline-offset: var(--td-focus-offset) !important;
}

body[data-tdai-refresh="unifold-4"] ::selection {
  background: var(--td-colour-violet-soft);
  color: var(--td-colour-carbon);
}

.tdai-indexed-skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 140;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-radius: var(--td-radius-medium);
  background: var(--td-colour-carbon);
  color: var(--td-colour-warm-white) !important;
  transform: translateY(-160%);
  text-decoration: none;
}

.tdai-indexed-skip:focus {
  transform: translateY(0);
}

.tdai-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid var(--td-border-subtle);
  background: color-mix(in srgb, var(--td-colour-warm-white) 96%, transparent);
}

.tdai-site-header__inner {
  width: var(--tdai-shell);
  min-height: 4.75rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.tdai-site-header__brand {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.tdai-site-header__brand img {
  width: clamp(9rem, 15vw, 11rem);
  height: auto;
}

.tdai-site-header__nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.85rem, 2.1vw, 1.7rem);
}

.tdai-site-header__nav a {
  color: var(--td-colour-carbon) !important;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.tdai-site-header__nav a:not(.tdai-site-header__cta):is(:hover, :focus-visible) {
  color: var(--td-text-link) !important;
  text-decoration: underline;
  text-underline-offset: 0.34em;
}

.tdai-site-header__nav a[aria-current="page"] {
  color: var(--td-text-link) !important;
}

.tdai-site-header__cta {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--td-radius-medium);
  background: var(--td-action-primary);
  color: var(--td-action-primary-text) !important;
}

.tdai-site-header__cta:is(:hover, :focus-visible) {
  background: var(--td-action-primary-hover);
}

body[data-tdai-refresh="unifold-4"] > :is(main, article, section, header:not(.tdai-site-header)) {
  background: transparent !important;
  color: var(--td-colour-carbon) !important;
}

body[data-tdai-refresh="unifold-4"] > main {
  padding-top: clamp(3.5rem, 7vw, 6rem) !important;
}

body[data-tdai-refresh="unifold-4"] > :is(section:first-of-type, header:not(.tdai-site-header):first-of-type) {
  padding-top: clamp(3.5rem, 7vw, 6rem) !important;
  text-align: left !important;
}

body[data-tdai-refresh="unifold-4"] > :is(section:first-of-type, header:not(.tdai-site-header):first-of-type) :is(.justify-center) {
  justify-content: flex-start !important;
}

body[data-tdai-refresh="unifold-4"] > :is(section:first-of-type, header:not(.tdai-site-header):first-of-type) > :is(div, article) {
  margin-left: 0;
}

body[data-tdai-refresh="unifold-4"] :is(.font-body, p, li, a, button, input, textarea, select) {
  font-family: var(--td-font-body) !important;
}

body[data-tdai-refresh="unifold-4"] :is(.text-white, [class*="text-white/"]) {
  color: var(--td-text-primary) !important;
}

body[data-tdai-refresh="unifold-4"] :is(.text-accent, [class*="text-accent/"]) {
  color: var(--td-colour-violet-deep) !important;
}

body[data-tdai-refresh="unifold-4"] :is(.bg-accent, [class*="bg-accent/"]) {
  background: var(--td-action-primary) !important;
  color: var(--td-action-primary-text) !important;
}

body[data-tdai-refresh="unifold-4"] [style*="color:#00B4D8" i] {
  color: var(--td-text-link) !important;
}

body[data-tdai-refresh="unifold-4"] [style*="background:#00B4D8" i] {
  background: var(--td-action-primary) !important;
  color: var(--td-action-primary-text) !important;
}

body[data-tdai-refresh="unifold-4"] :is(a.rounded-full, button.rounded-full, input.rounded-full, textarea.rounded-full) {
  border-radius: var(--td-radius-medium) !important;
}

body[data-tdai-refresh="unifold-4"] :is(a.bg-accent, button.bg-accent, .tdai-primary-action) {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.25rem;
  border: 1px solid transparent !important;
  border-radius: var(--td-radius-medium) !important;
  background: var(--td-action-primary) !important;
  color: var(--td-action-primary-text) !important;
  font-weight: 650 !important;
}

body[data-tdai-refresh="unifold-4"] :is(.liquid-glass, .liquid-glass-strong) {
  border: 1px solid var(--td-border-subtle) !important;
  border-radius: var(--td-radius-large) !important;
  background: var(--td-surface-raised) !important;
  box-shadow: 0 18px 48px rgb(39 26 92 / 7%) !important;
  backdrop-filter: none !important;
}

body[data-tdai-refresh="unifold-4"] :is(.bg-obsidian-mesh, [class*="bg-neutral"]) {
  background: transparent !important;
}

body[data-tdai-refresh="unifold-4"] :is(input, textarea, select) {
  min-height: 3rem;
  border: 1px solid var(--td-border-control) !important;
  border-radius: var(--td-radius-medium) !important;
  background: var(--td-surface-raised) !important;
  color: var(--td-colour-carbon) !important;
}

body[data-tdai-refresh="unifold-4"] :is(input, textarea)::placeholder {
  color: var(--td-text-tertiary) !important;
  opacity: 1;
}

body[data-tdai-refresh="unifold-4"] :is(table) {
  width: 100%;
  border-collapse: collapse;
  background: var(--td-surface-raised);
  color: var(--td-colour-carbon);
}

body[data-tdai-refresh="unifold-4"] :is(th, td) {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--td-border-subtle);
  color: var(--td-text-secondary) !important;
  text-align: left;
}

body[data-tdai-refresh="unifold-4"] :is(th) {
  color: var(--td-colour-carbon) !important;
  font-weight: 650;
}

body[data-tdai-refresh="unifold-4"] :is(.prose-dark, article) {
  color: var(--td-text-secondary) !important;
}

body[data-tdai-refresh="unifold-4"] .prose-dark {
  width: var(--tdai-reading);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

body[data-tdai-refresh="unifold-4"] .prose-dark :is(p, ul, ol, blockquote, table) {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

body[data-tdai-refresh="unifold-4"] .prose-dark :is(h2) {
  margin-top: clamp(3rem, 7vw, 5rem);
  margin-bottom: 1.25rem;
}

body[data-tdai-refresh="unifold-4"] .prose-dark :is(h3) {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

body[data-tdai-refresh="unifold-4"] .prose-dark :is(ul, ol) {
  padding-left: 1.3rem;
}

body[data-tdai-refresh="unifold-4"] .prose-dark li + li {
  margin-top: 0.55rem;
}

body[data-tdai-refresh="unifold-4"] .prose-dark blockquote {
  padding: 1.25rem 0 1.25rem 1.5rem;
  border-left: 3px solid var(--td-colour-violet);
  background: transparent !important;
}

body[data-tdai-refresh="unifold-4"] #blogGrid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
}

body[data-tdai-refresh="unifold-4"] #blogGrid .article-card {
  grid-column: span 6 !important;
  min-height: 17rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) !important;
}

body[data-tdai-refresh="unifold-4"] #blogGrid .article-card:nth-child(5n + 1) {
  grid-column: span 7 !important;
}

body[data-tdai-refresh="unifold-4"] #blogGrid .article-card:nth-child(5n + 2) {
  grid-column: span 5 !important;
}

body[data-tdai-refresh="unifold-4"] #blogGrid .article-card:nth-child(5n) {
  grid-column: span 12 !important;
  min-height: 13rem;
}

body[data-tdai-refresh="unifold-4"] #blogGrid .article-card h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.65rem) !important;
}

body[data-tdai-refresh="unifold-4"] :is(.library-filter, [role="tab"]) {
  min-height: 2.75rem;
  border-radius: var(--td-radius-small) !important;
}

body[data-tdai-refresh="unifold-4"] :is(.library-filter[aria-pressed="true"], [role="tab"][aria-selected="true"]) {
  border-color: var(--td-colour-violet) !important;
  background: var(--td-colour-violet-soft) !important;
  color: var(--td-colour-carbon) !important;
}

body[data-tdai-refresh="unifold-4"] > .fixed.bottom-0 {
  display: none !important;
}

.tdai-site-footer {
  margin-top: clamp(5rem, 10vw, 8rem);
  padding: clamp(3.5rem, 7vw, 5rem) 0 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 16%);
  background: var(--td-colour-carbon) !important;
  color: var(--td-colour-warm-white);
}

.tdai-site-footer__inner {
  width: var(--tdai-shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(9rem, 0.7fr) minmax(9rem, 0.7fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.tdai-site-footer__brand a {
  display: inline-flex;
}

.tdai-site-footer__brand img {
  width: min(11rem, 60vw);
  height: auto;
}

.tdai-site-footer__brand p {
  max-width: 32rem;
  margin: 1.25rem 0 0;
  color: rgb(247 244 238 / 74%) !important;
  font-size: 1rem;
}

.tdai-site-footer nav {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.tdai-site-footer nav span {
  margin-bottom: 0.35rem;
  color: var(--td-colour-warm-white);
  font-family: var(--td-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tdai-site-footer nav a {
  color: rgb(247 244 238 / 72%) !important;
  font-size: 0.9rem;
  text-decoration: none;
}

.tdai-site-footer nav a:is(:hover, :focus-visible) {
  color: var(--td-colour-warm-white) !important;
  text-decoration: underline;
}

.tdai-site-footer__base {
  width: var(--tdai-shell);
  margin: 3rem auto 0;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgb(255 255 255 / 14%);
  color: rgb(247 244 238 / 52%);
  font-family: var(--td-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

body[data-tdai-refresh="unifold-4"] .text-\[10px\],
body[data-tdai-refresh="unifold-4"] .text-\[11px\],
body[data-tdai-refresh="unifold-4"] [style*="font-size:10px"],
body[data-tdai-refresh="unifold-4"] [style*="font-size:11px"] {
  font-size: 0.75rem !important;
}

.tdai-icon {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  flex: none;
  vertical-align: -0.15em;
}

@media (max-width: 64rem) {
  .tdai-site-header__nav a:not(.tdai-site-header__cta) {
    display: none;
  }

  body[data-tdai-refresh="unifold-4"] #blogGrid .article-card,
  body[data-tdai-refresh="unifold-4"] #blogGrid .article-card:nth-child(n) {
    grid-column: span 6 !important;
  }
}

@media (max-width: 48rem) {
  body[data-tdai-refresh="unifold-4"] {
    --tdai-shell: min(100% - 3rem, 76rem);
    --tdai-reading: min(100% - 3rem, 46rem);
  }

  .tdai-site-header__inner {
    min-height: 4.25rem;
    gap: 0.75rem;
  }

  .tdai-site-header__brand img {
    width: 8.75rem;
  }

  .tdai-site-header__cta {
    min-height: 2.75rem;
    padding-inline: 0.8rem;
    font-size: 0.78rem !important;
  }

  body[data-tdai-refresh="unifold-4"] h1 {
    font-size: clamp(2.5rem, 12vw, 3.75rem) !important;
    letter-spacing: -0.045em !important;
    line-height: 1 !important;
  }

  body[data-tdai-refresh="unifold-4"] h2 {
    font-size: clamp(1.85rem, 8vw, 2.7rem) !important;
  }

  body[data-tdai-refresh="unifold-4"] > main {
    padding-top: 3.5rem !important;
  }

  body[data-tdai-refresh="unifold-4"] > :is(section:first-of-type, header:not(.tdai-site-header):first-of-type) {
    padding-top: 3.5rem !important;
  }

  body[data-tdai-refresh="unifold-4"] #blogGrid .article-card,
  body[data-tdai-refresh="unifold-4"] #blogGrid .article-card:nth-child(n) {
    grid-column: 1 / -1 !important;
    min-height: 0;
  }

  .tdai-site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .tdai-site-footer__brand {
    grid-column: 1 / -1;
  }

  .tdai-site-footer__base {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 23rem) {
  body[data-tdai-refresh="unifold-4"] {
    --tdai-shell: calc(100% - 2rem);
    --tdai-reading: calc(100% - 2rem);
  }

  .tdai-site-header__brand img {
    width: 7.8rem;
  }

  .tdai-site-header__cta {
    padding-inline: 0.65rem;
    font-size: 0.72rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-tdai-refresh="unifold-4"] *,
  body[data-tdai-refresh="unifold-4"] *::before,
  body[data-tdai-refresh="unifold-4"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
