/* The site shares corner, focus and motion treatments with the reports.
   Each report keeps its own color palette. */
:root {
  --ft-action-corners: 10px 16px 10px 10px;
  --ft-control-corners: 8px 12px 8px 8px;
  --ft-image-corners: 16px 32px 16px 16px;
  --ft-photo-corners: 22px 46px 22px 22px;
  --ft-focus: #7442ac;
}

:is(button, [role="button"], [role="tab"], input[type="submit"]):not(.menu-toggle, .organ, .ft-play, .trace-dock nav button, [class*="rounded-full"], [class*="icon-only"]),
:is(a, button):is(.btn, .button, .btn-primary, .btn-secondary, .cta-btn, .ft-skin-cta, [class$="-button"]),
:is(.seg, .tryit, .dl a, .replay, .rp-btn, .motion, .fbtn, .ed, .reset, .printbtn, .pause, .toggle),
:is(.next-essay a, a[data-ori-path], a[data-site-path], a.hx-read) {
  border-radius: var(--ft-control-corners) !important;
}

:is(a, button):is(.btn, .button, .btn-primary, .btn-secondary, .cta-btn, .ft-skin-cta, [class$="-button"]),
:is(a, button)[class~="rounded-full"][class*="px-"],
input[type="submit"] {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: break-word;
  line-height: 1.4;
  border-radius: var(--ft-action-corners) !important;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

:is(a, button)[class~="rounded-full"][class*="px-"][class*="shadow"] {
  box-shadow: 0 2px 4px #21162d20;
}

:is(a, button):is(.btn, .button, .btn-primary, .btn-secondary, .cta-btn, .ft-skin-cta):active,
:is(a, button)[class~="rounded-full"][class*="px-"]:active {
  transform: translateY(1px);
}

:is(a, button, summary, input, select, textarea, [role="button"], [role="tab"]):focus-visible {
  outline: 2px solid var(--ft-focus);
  outline-offset: 4px;
}

/* A small amount of tint keeps category labels visually distinct from actions. */
:is(span, p, div):is(.pill, .chip, .badge, .tag, .verdict, .st, .status),
.chips span {
  border-radius: 5px !important;
  box-shadow: none;
}

/* Status labels over figures retain their background for legibility. */
body[data-ft-report] :is(span, p, div, small)[class~="rounded-full"][class*="px-"][class*="py-"],
body[data-ft-report] .status-stamp {
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* Publisher lines, section kickers, and chart keys sit directly on the page. */
body[data-ft-report] :is(span, p, div, small):is(
  [class~="rounded-full"], [class~="inline-block"][class~="border"]
)[class~="uppercase"][class*="tracking-"][class*="px-"]:not(
  [class~="absolute"], [class*="text-red-"], [class*="text-rose-"], [role="status"]
) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  inline-size: fit-content;
  max-inline-size: 100%;
  line-height: 1.5;
}

body[data-ft-report] div[class~="rounded-full"][class~="border"][class*="px-"]:has(
  > [class~="rounded-full"][class~="w-2.5"]
) {
  background: transparent !important;
  backdrop-filter: none !important;
  padding-inline: 0 !important;
}

/* The Clinical masthead sits on a near-black surface. */
body[data-ft-report] header.bg-stone-900.min-h-screen > .absolute.inset-0.z-0.bg-stone-900 {
  opacity: .29;
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent {
  background: rgb(28 25 23 / 92%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 12%);
  backdrop-filter: blur(12px);
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent :is(.text-stone-900, .text-stone-600) {
  color: #f6f1fc;
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent .text-stone-500 {
  color: #dbd0e4;
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent a[href="#action"] {
  background: #8051ba;
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent a[href="#action"]:hover {
  background: #895bc4;
}

body[data-ft-report]:has(header.bg-stone-900.min-h-screen) nav.fixed.bg-transparent :focus-visible {
  outline-color: #e4d7f5;
}

body[data-ft-report] header.bg-stone-900.min-h-screen .text-fem-turq.uppercase {
  color: #e4d7f5;
}

body[data-ft-report] header.bg-stone-900.min-h-screen a[href="#specialties"] {
  background: #8051ba;
  color: #fff;
}

body[data-ft-report] header.bg-stone-900.min-h-screen a[href="#specialties"]:hover {
  background: #895bc4;
}

body[data-ft-report] header.bg-stone-900.min-h-screen a[href="#specialties"]:focus-visible {
  outline-color: #e4d7f5;
}

.tierline span {
  background: transparent !important;
  border: 0 !important;
  padding-left: 0 !important;
}

:is(article.card, article[class*="-card"], .paper-card, .resource-card, .feature-card) {
  box-shadow: none;
}

.resource-grid:has(> .resource-card) {
  background: transparent;
  border: 0;
  gap: 14px;
}

.resource-grid > .resource-card {
  border-radius: var(--ft-image-corners);
}

/* Set the brand mark inside the existing text lockups. */
.ft-brand-mark {
  display: block !important;
  width: 36px !important;
  height: 38px !important;
  max-width: none !important;
  flex: 0 0 auto;
  object-fit: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

:is(.ft-brand, .ft-skin-brand, .brand > a.logo):has(> .ft-brand-mark) {
  display: inline-flex !important;
  align-items: center;
  gap: 10px !important;
  white-space: nowrap;
  overflow-wrap: normal;
}

.brand > .logo {
  white-space: nowrap;
  overflow-wrap: normal;
  flex-shrink: 0;
}

:is(.ft-header, .ft-skin-header) :is(nav a, .ft-menu, .revision-menu) {
  border-radius: var(--ft-control-corners) !important;
}

:is(.ft-header, .ft-skin-header) nav a[aria-current="page"]:not(.ft-nav-cta, .ft-skin-cta) {
  border-radius: 10px 12px 10px 8px !important;
}

:is(.ft-header, .ft-skin-header) nav a:is(.ft-nav-cta, .ft-skin-cta) {
  border-radius: 14px 18px 14px 6px !important;
}

/* Frame media separately from its caption. Full diagrams keep their aspect ratio. */
.ft-story :is(.ft-out-cover, .o11-shot, .v2-fig, .ft-summit-media, .revision-pathway img),
.rv8 :is(.top figure, .card .th, .card .revision-comparison),
.cover-art > img,
.gp > img,
.report-plate,
.event-art,
.document-preview img {
  border-radius: var(--ft-image-corners) !important;
}

.speaker-portrait img,
.speaking-photo-pair img,
.engagement-feature figure img,
.ft-story .ph img,
.ft-story .ft-summit-media img {
  display: block;
  border-radius: var(--ft-photo-corners) !important;
}

.rv8 .card .th {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border: 0;
  object-fit: contain;
}

.rv8 .card .th:is([src$="report-nature.jpg"], [src$="axial.jpg"]) {
  object-fit: cover;
}

.rv8 .card .revision-comparison {
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 10;
  padding: clamp(18px, 2.6vw, 32px);
  gap: 8px;
}

.rv8 .card .revision-comparison strong {
  font-size: clamp(34px, 4.3vw, 62px);
}

.budget-row-label {
  white-space: normal !important;
}

.share-end {
  font-size: 15px !important;
  line-height: 1.2 !important;
}

main, section, article, header, footer {
  min-width: 0;
}

p, li, td, th, a, h1, h2, h3, h4 {
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  body[data-ft-report] header.bg-stone-900.min-h-screen > .absolute.inset-0.z-0.bg-stone-900 {
    opacity: .18;
  }
  .ft-brand-mark {
    width: 32px !important;
    height: 34px !important;
  }
  h1, h2, h3, h4 { max-width: 100%; }
  .grid-layout > * { min-width: 0; }
  .application-invite {
    padding: 1.25rem;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .application-invite > * { min-width: 0; }
  .application-invite .btn-primary {
    white-space: normal !important;
    max-width: 100%;
  }
  .brand {
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand > .eyebrow {
    flex: 1;
    min-width: 140px;
  }
  #inline-replacement {
    flex-direction: column !important;
    gap: 1.8rem !important;
  }
  [class~="p-64"]:empty {
    max-width: 100vw;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  :is(a, button):is(.btn, .button, .btn-primary, .btn-secondary, .cta-btn, .ft-skin-cta, [class$="-button"]) {
    transition: none;
  }
}
