/* Version discovery: choose a world first, then explore its features. */
.worlds {
  --world-ink: var(--ink, #182045);
  --world-muted: var(--muted, #68718c);
  --world-blue: var(--blue, #4169ed);
  --world-violet: var(--violet, #8661d9);
  position: relative;
  min-width: 0;
  padding: clamp(76px, 8vw, 118px) 6%;
  scroll-margin-top: 78px;
  color: var(--world-ink);
  font-family: var(--sans, sans-serif);
  background:
    radial-gradient(ellipse at 12% 15%, rgba(219, 231, 255, .66), transparent 34%),
    radial-gradient(ellipse at 88% 32%, rgba(237, 223, 255, .62), transparent 32%),
    linear-gradient(180deg, #fafbff 0%, #f4f6fd 100%);
}

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

.worlds [hidden] {
  display: none !important;
}

.worlds-inner {
  width: 100%;
  max-width: 1270px;
  min-width: 0;
  margin: 0 auto;
}

.worlds-header {
  max-width: 720px;
  min-width: 0;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.worlds-kicker,
.world-detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7775c6;
  font: 800 10px/1.5 var(--display, sans-serif);
  letter-spacing: .14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.worlds-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #8a79e4;
  box-shadow: 0 0 0 5px rgba(138, 121, 228, .1);
}

.worlds-header h2 {
  margin: 17px 0 13px;
  color: #1d2751;
  font: 800 clamp(32px, 4vw, 52px)/1.22 var(--display, sans-serif);
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.worlds-header p {
  max-width: 610px;
  margin: 0;
  color: #697591;
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  min-width: 0;
  align-items: stretch;
}

.world-card {
  --card-accent: #5674e8;
  --card-deep: #3d5dcd;
  --card-tint: #eef3ff;
  --card-wash: #e2ecff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(207, 217, 238, .88);
  border-radius: 22px;
  background: linear-gradient(155deg, #fff 15%, var(--card-tint) 150%);
  box-shadow: 0 12px 35px rgba(57, 68, 119, .055);
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background .24s ease;
  -webkit-tap-highlight-color: transparent;
}

.noscript-notice {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #53617e;
  font-size: 13px;
  line-height: 1.7;
}

.world-card--anchor {
  --card-accent: #5674e8;
  --card-deep: #405fcd;
  --card-tint: #edf3ff;
  --card-wash: #dfeaff;
}

.world-card--agency {
  --card-accent: #8767d9;
  --card-deep: #7351c0;
  --card-tint: #f4efff;
  --card-wash: #eae1ff;
}

.world-card--operations {
  --card-accent: #af70b7;
  --card-deep: #96569f;
  --card-tint: #fff0f8;
  --card-wash: #f9e3f3;
}

.world-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-accent);
  box-shadow: 0 20px 44px rgba(57, 68, 119, .12);
}

.world-card[aria-expanded="true"] {
  border-color: var(--card-accent);
  background: linear-gradient(155deg, #fff 8%, var(--card-tint) 115%);
  box-shadow: 0 0 0 2px var(--card-accent), 0 18px 42px rgba(73, 80, 156, .14);
}

.world-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 15px;
  color: var(--card-deep);
  font: 800 10px/1.4 var(--display, sans-serif);
  letter-spacing: .12em;
}

.world-card-top span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.world-card-top span:last-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(133, 144, 190, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  color: var(--card-deep);
  font: 600 16px/1 var(--sans, sans-serif);
  letter-spacing: normal;
  transition: background .24s ease, color .24s ease, border-color .24s ease;
}

.world-card[aria-expanded="true"] .world-card-top span:last-child {
  border-color: var(--card-accent);
  background: var(--card-accent);
  color: #fff;
}

.world-card-art {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 14px;
  background: radial-gradient(circle at 68% 25%, #fff 0%, transparent 45%), var(--card-wash);
}

.world-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding-top: 23px;
}

.world-card-copy small,
.world-card-copy strong,
.world-card-copy em {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.world-card-copy small {
  color: var(--card-deep);
  font: 800 10px/1.5 var(--display, sans-serif);
  letter-spacing: .1em;
}

.world-card-copy strong {
  color: #25305b;
  font: 800 clamp(20px, 1.9vw, 26px)/1.35 var(--display, sans-serif);
  letter-spacing: -.035em;
}

.world-card-copy em {
  color: #697591;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.75;
}

.world-card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin-top: auto;
  padding-top: 22px;
  color: var(--card-deep);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.world-detail {
  min-width: 0;
  margin-top: 28px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid #e1e6f2;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 20px 55px rgba(54, 65, 116, .07);
  scroll-margin-top: 95px;
}

.world-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding-bottom: 25px;
  border-bottom: 1px solid #e9edf5;
}

.world-detail-head > div {
  min-width: 0;
  max-width: 760px;
}

.world-detail-head h3 {
  margin: 10px 0 8px;
  color: #222e59;
  font: 800 clamp(24px, 2.7vw, 34px)/1.3 var(--display, sans-serif);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.world-detail-head p {
  margin: 0;
  color: #6d7994;
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.world-close {
  min-height: 42px;
  flex: none;
  padding: 8px 15px;
  border: 1px solid #e1e6f2;
  border-radius: 99px;
  background: #f9faff;
  color: #5e6a89;
  font: 700 12px/1.4 var(--sans, sans-serif);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.world-close:hover {
  border-color: #bab5e9;
  background: #f3f1ff;
  color: #6258c3;
}

.world-feature-groups,
.world-feature-group {
  min-width: 0;
}

.world-feature-group {
  padding-top: 29px;
}

.world-feature-group + .world-feature-group {
  margin-top: 29px;
  border-top: 1px solid #edf0f6;
}

.world-group-title {
  margin: 0 0 16px;
  color: #35416b;
  font: 800 16px/1.5 var(--display, sans-serif);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.world-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.world-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e8ecf5;
  border-radius: 15px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(59, 70, 120, .035);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.world-feature:hover {
  transform: translateY(-3px);
  border-color: #c7c8ed;
  box-shadow: 0 12px 28px rgba(59, 70, 120, .1);
}

.world-feature-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  max-height: 165px;
  overflow: hidden;
  border-radius: 10px;
  background: radial-gradient(circle at 75% 20%, rgba(255, 255, 255, .9), transparent 50%), linear-gradient(135deg, #edf3ff, #f2ecff);
}

.world-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
}

.world-feature-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  max-width: 80%;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 15px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 8px 20px rgba(102, 104, 177, .1);
  color: #7062ce;
  font: 800 19px/1 var(--display, sans-serif);
}

.world-feature-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 13px 5px 5px;
}

.world-feature-name,
.world-feature-action {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.world-feature-name {
  color: #303d68;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.world-feature-action {
  margin-top: auto;
  color: #7065c7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

/* The document edition reuses the same cards; a selected feature becomes a
   direct reading view rather than another accordion row. */
.edition-feature-grid {
  margin: 22px 0 26px;
}

.edition-feature-grid .world-feature[aria-current="true"] {
  border-color: #aaa5e9;
  box-shadow: 0 0 0 2px rgba(125, 113, 220, .13), 0 12px 28px rgba(59, 70, 120, .08);
}

.has-feature-choices .feature-panel[hidden] {
  display: none;
}

.has-feature-choices .feature-panel > .feature-toggle {
  cursor: default;
}

.has-feature-choices .feature-panel .feature-cue {
  display: none;
}

.feature-detail-back {
  display: inline-flex;
  align-items: center;
  margin: 17px 0 0;
  padding: 8px 13px;
  border: 1px solid #e0e4f1;
  border-radius: 99px;
  background: #f9f9ff;
  color: #625bc0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.feature-detail-back:hover {
  border-color: #b6b1e7;
  background: #f2f1ff;
}

.world-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  margin-top: 28px;
  padding: 10px 18px;
  border: 1px solid #dbdff0;
  border-radius: 99px;
  background: #f8f8ff;
  color: #5e58bd;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.world-all:hover {
  border-color: #aaa4e4;
  background: #f0efff;
  color: #4e48a8;
}

.world-card:focus-visible,
.world-close:focus-visible,
.world-feature:focus-visible,
.world-all:focus-visible {
  outline: 3px solid #7058ed;
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .world-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .worlds {
    padding: 72px 6% 78px;
    scroll-margin-top: 68px;
  }

  .worlds-header {
    margin-bottom: 26px;
  }

  .worlds-header h2 {
    font-size: clamp(30px, 8.3vw, 40px);
  }

  .worlds-header p {
    font-size: 14px;
  }

  .worlds-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .world-card {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    grid-template-areas: 'top top' 'art copy' 'art cta';
    align-items: start;
    column-gap: 15px;
    row-gap: 10px;
    padding: 15px;
    border-radius: 18px;
  }

  .world-card-top {
    grid-area: top;
    margin: 0;
  }

  .world-card-art {
    grid-area: art;
    align-self: center;
    border-radius: 11px;
  }

  .world-card-copy {
    grid-area: copy;
    gap: 5px;
    padding: 0;
  }

  .world-card-copy strong {
    font-size: 19px;
  }

  .world-card-copy em {
    font-size: 12px;
    line-height: 1.65;
  }

  .world-card-cta {
    grid-area: cta;
    margin: 0;
    padding: 0;
  }

  .world-detail {
    margin-top: 18px;
    padding: 22px 18px;
    border-radius: 19px;
    scroll-margin-top: 80px;
  }

  .world-detail-head {
    gap: 12px;
    padding-bottom: 21px;
  }

  .world-detail-head h3 {
    font-size: 25px;
  }

  .world-detail-head p {
    font-size: 13px;
  }

  .world-close {
    padding: 8px 12px;
  }

  .world-feature-group {
    padding-top: 23px;
  }

  .world-feature-group + .world-feature-group {
    margin-top: 23px;
  }

  .world-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .world-feature {
    padding: 7px;
    border-radius: 13px;
  }

  .world-feature-meta {
    padding: 11px 4px 4px;
  }

  .world-feature-name {
    font-size: 13px;
  }

  .world-all {
    margin-top: 24px;
  }
}

@media (max-width: 340px) {
  .world-card {
    column-gap: 11px;
    padding: 13px;
  }

  .world-card-copy strong {
    font-size: 18px;
  }

  .world-detail-head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-card,
  .world-card-top span:last-child,
  .world-close,
  .world-feature,
  .world-all {
    transition: none;
  }

  .world-card:hover,
  .world-feature:hover {
    transform: none;
  }
}
