/* Atlas stock-category research worlds.
   Route-owned progressive enhancement; crawlable directory HTML stays canonical. */

body[data-atlas-category-world="v2"] {
  --cw-bg: #020914;
  --cw-panel: rgba(5, 21, 34, 0.88);
  --cw-panel-strong: #061724;
  --cw-line: rgba(91, 221, 244, 0.24);
  --cw-line-strong: rgba(91, 221, 244, 0.48);
  --cw-cyan: #52dcf3;
  --cw-green: #28d69a;
  --cw-gold: #f0bc50;
  --cw-white: #f5fbff;
  --cw-muted: #a9bfd0;
  background-color: var(--cw-bg);
  background-image:
    linear-gradient(rgba(74, 204, 229, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 204, 229, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  color: var(--cw-white);
}

html[data-theme="light"] body[data-atlas-category-world="v2"] {
  --cw-bg: #edf6fa;
  --cw-panel: rgba(255, 255, 255, 0.88);
  --cw-panel-strong: #ffffff;
  --cw-line: rgba(7, 105, 132, 0.20);
  --cw-line-strong: rgba(7, 105, 132, 0.46);
  --cw-cyan: #087998;
  --cw-green: #087a5d;
  --cw-gold: #9b6800;
  --cw-white: #061522;
  --cw-muted: #4b6474;
  background-image:
    linear-gradient(rgba(7, 105, 132, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 105, 132, 0.05) 1px, transparent 1px);
}

body[data-atlas-category-world="v2"] .category-world-page {
  max-width: 1320px;
  padding-top: 34px;
}

body[data-atlas-category-world="v2"] .crumbs {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--cw-line);
  color: var(--cw-muted);
}

.category-world-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  gap: 54px;
  align-items: center;
  min-height: 590px;
  padding: 44px 0 52px;
  border-bottom: 1px solid var(--cw-line);
}

.category-world-eyebrow,
.category-world-section-head span,
.category-world-lens__head,
.category-world-lens__detail > span,
.category-world-path__steps > li > span,
.category-world-lane > span,
.category-world-hero__proof dt {
  margin: 0;
  color: var(--cw-cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.category-world-hero h1 {
  max-width: 820px;
  margin: 20px 0 22px;
  color: var(--cw-white);
  font-size: 72px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.98;
  text-wrap: balance;
}

.category-world-hero__copy > p:not(.category-world-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--cw-muted);
  font-size: 19px;
  line-height: 1.58;
}

.category-world-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.category-world-hero__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid var(--cw-cyan);
  border-radius: 5px;
  background: var(--cw-cyan);
  color: #031019;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.10em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 110ms ease, box-shadow 180ms ease;
}

.category-world-hero__actions a + a {
  background: transparent;
  color: var(--cw-cyan);
}

.category-world-hero__actions a:active {
  transform: scale(0.985);
}

.category-world-hero__actions a:focus-visible,
.category-world-lens__node:focus-visible,
.category-world-lane:focus-visible,
.category-world-directory a:focus-visible,
.category-world-directory input:focus-visible {
  outline: 2px solid var(--cw-gold);
  outline-offset: 3px;
}

.category-world-hero__proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px 0 0;
  border-top: 1px solid var(--cw-line);
  border-bottom: 1px solid var(--cw-line);
}

.category-world-hero__proof div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--cw-line);
}

.category-world-hero__proof div:first-child { padding-left: 0; }
.category-world-hero__proof div:last-child { border-right: 0; }

.category-world-hero__proof dd {
  margin: 7px 0 0;
  color: var(--cw-white);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
}

.category-world-lens {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--cw-line-strong);
  border-radius: 6px;
  background: var(--cw-panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.category-world-lens::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--cw-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--cw-line) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  opacity: 0.22;
  pointer-events: none;
}

.category-world-lens__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-world-lens__head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--cw-gold);
  border-radius: 4px;
  color: var(--cw-gold);
}

.category-world-lens__field {
  position: relative;
  min-height: 350px;
  margin-top: 12px;
}

.category-world-lens__axis {
  position: absolute;
  z-index: 0;
  display: block;
  background: var(--cw-line);
  pointer-events: none;
}

.category-world-lens__axis--x {
  top: 50%;
  right: 4%;
  left: 4%;
  height: 1px;
}

.category-world-lens__axis--y {
  top: 7%;
  bottom: 7%;
  left: 50%;
  width: 1px;
}

.category-world-lens__core {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border: 1px solid var(--cw-line-strong);
  border-radius: 50%;
  background: var(--cw-panel-strong);
  box-shadow: 0 0 0 18px color-mix(in srgb, var(--cw-cyan) 5%, transparent);
  transform: translate(-50%, -50%);
}

.category-world-lens__core::before,
.category-world-lens__core::after {
  position: absolute;
  border: 1px solid var(--cw-line);
  border-radius: 50%;
  content: "";
}

.category-world-lens__core::before { inset: -42px; }
.category-world-lens__core::after { inset: -76px; border-style: dashed; }

.category-world-lens__core img {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

.category-world-lens__core span {
  position: absolute;
  right: 0;
  bottom: -28px;
  left: 0;
  color: var(--cw-white);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-align: center;
}

.category-world-lens__node {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 174px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--cw-line);
  border-radius: 5px;
  background: var(--cw-panel-strong);
  color: var(--cw-white);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.category-world-lens__node:nth-of-type(1) { top: 28px; left: 0; }
.category-world-lens__node:nth-of-type(2) { top: 145px; right: 0; }
.category-world-lens__node:nth-of-type(3) { bottom: 18px; left: 24px; }

.category-world-lens__node span {
  color: var(--cw-cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}

.category-world-lens__node strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.category-world-lens__node.is-active {
  border-color: var(--cw-cyan);
  color: var(--cw-cyan);
  transform: translateY(-2px);
}

.category-world-lens.is-scanning .category-world-lens__core {
  animation: category-world-core-settle 520ms cubic-bezier(0.22, 0.72, 0.2, 1);
}

.category-world-lens__detail {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  min-height: 92px;
  padding: 15px;
  border-top: 1px solid var(--cw-line);
}

.category-world-lens__detail > span { grid-row: 1 / span 2; }

.category-world-lens__detail strong {
  color: var(--cw-white);
  font-size: 15px;
}

.category-world-lens__detail p {
  margin: 0;
  color: var(--cw-muted);
  font-size: 13px;
  line-height: 1.48;
}

.category-world-chapter {
  padding: 54px 0;
  border-bottom: 1px solid var(--cw-line);
}

.category-world-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 26px;
}

.category-world-section-head h2 {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--cw-white);
  font-size: 42px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.03;
}

.category-world-section-head > p {
  margin: 0;
  color: var(--cw-muted);
  font-size: 15px;
  line-height: 1.62;
}

.category-world-path__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--cw-line);
  border-bottom: 1px solid var(--cw-line);
  list-style: none;
}

.category-world-path__steps li {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--cw-line);
}

.category-world-path__steps li:first-child { padding-left: 0; }
.category-world-path__steps li:last-child { border-right: 0; }

.category-world-path__steps strong {
  display: block;
  margin-top: 8px;
  color: var(--cw-white);
  font-size: 17px;
}

.category-world-path__steps p {
  margin: 8px 0 0;
  color: var(--cw-muted);
  font-size: 13px;
  line-height: 1.55;
}

body[data-atlas-category-world="v2"] .category-world-pulse .atlas-pulse-rail {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-atlas-category-world="v2"] .category-world-pulse .atlas-pulse-head {
  display: none;
}

body[data-atlas-category-world="v2"] .category-world-pulse .atlas-pulse-strip {
  grid-auto-columns: minmax(250px, 1fr);
  gap: 10px;
}

body[data-atlas-category-world="v2"] .category-world-pulse .atlas-pulse-card {
  min-height: 168px;
  border-color: var(--cw-line);
  border-radius: 5px;
  background: var(--cw-panel);
}

.category-world-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.category-world-lane {
  display: grid;
  grid-template-rows: auto minmax(34px, auto) auto;
  gap: 8px;
  min-width: 0;
  min-height: 126px;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--cw-line);
  border-radius: 5px;
  background: var(--cw-panel);
  color: var(--cw-white);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.category-world-lane strong {
  color: var(--cw-white);
  font-size: 14px;
  line-height: 1.25;
}

.category-world-lane small {
  align-self: end;
  color: var(--cw-muted);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-world-lane:hover,
.category-world-lane.is-current {
  border-color: var(--cw-cyan);
  transform: translateY(-2px);
}

.category-world-lane.is-current {
  box-shadow: inset 0 -4px 0 var(--cw-cyan);
}

body[data-atlas-category-world="v2"] .category-world-directory {
  padding-bottom: 110px;
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-search {
  min-height: 54px;
  margin-bottom: 12px;
  border-color: var(--cw-line-strong);
  border-radius: 5px;
  background: var(--cw-panel-strong);
  color: var(--cw-white);
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-count {
  color: var(--cw-muted);
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-alpha-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding-bottom: 9px;
  scroll-snap-type: x proximity;
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-alpha-chip {
  box-sizing: border-box;
  height: 46px !important;
  min-height: 46px !important;
  flex: 0 0 auto;
  padding: 0 14px !important;
  border-color: var(--cw-line);
  border-radius: 5px;
  background: var(--cw-panel);
  color: var(--cw-cyan);
  line-height: 1;
  scroll-snap-align: start;
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-section {
  content-visibility: auto;
  contain: layout style;
  contain-intrinsic-size: auto 72px;
  border-color: var(--cw-line);
  border-radius: 5px;
  background: var(--cw-panel);
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-section-label {
  min-height: 48px;
  box-sizing: border-box;
  color: var(--cw-cyan);
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-card {
  min-height: 68px;
  border-color: var(--cw-line);
  border-radius: 4px;
  background: var(--cw-panel-strong);
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-card__action {
  min-height: 44px;
  border-radius: 4px;
}

body[data-atlas-category-world="v2"] .category-world-directory .sym-section[hidden],
body[data-atlas-category-world="v2"] .category-world-directory .sym-card[hidden] {
  display: none !important;
}

@keyframes category-world-core-settle {
  0% { transform: translate(-50%, -50%) scale(0.94); }
  60% { transform: translate(-50%, -50%) scale(1.035); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 900px) {
  .category-world-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    min-height: 0;
  }

  .category-world-lens { max-width: 680px; }
  .category-world-section-head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .category-world-lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  body[data-atlas-category-world="v2"] {
    background-size: 34px 34px;
  }

  body[data-atlas-category-world="v2"] .category-world-page {
    padding: 18px 12px 100px;
  }

  body[data-atlas-category-world="v2"] .crumbs {
    margin-bottom: 0;
    font-size: 9px;
  }

  .category-world-hero {
    gap: 24px;
    padding: 30px 0 36px;
  }

  .category-world-hero h1 {
    margin: 14px 0 18px;
    font-size: 46px;
    line-height: 1.02;
  }

  .category-world-hero__copy > p:not(.category-world-eyebrow) {
    font-size: 16px;
    line-height: 1.55;
  }

  .category-world-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 22px;
  }

  .category-world-hero__actions a {
    width: 100%;
    min-height: 50px;
    padding: 0 12px;
    white-space: normal;
  }

  .category-world-hero__proof div {
    padding: 13px 8px;
  }

  .category-world-hero__proof div:first-child { padding-left: 0; }
  .category-world-hero__proof dt { font-size: 8px; letter-spacing: 0.08em; }
  .category-world-hero__proof dd { font-size: 13px; overflow-wrap: anywhere; }

  .category-world-lens {
    padding: 14px;
  }

  .category-world-lens__field {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    min-height: 292px;
    padding-top: 176px;
  }

  .category-world-lens__core {
    top: 88px;
    width: 94px;
    height: 94px;
  }

  .category-world-lens__core::before { inset: -26px; }
  .category-world-lens__core::after { inset: -48px; }
  .category-world-lens__core img { width: 58px; height: 58px; }

  .category-world-lens__node,
  .category-world-lens__node:nth-of-type(1),
  .category-world-lens__node:nth-of-type(2),
  .category-world-lens__node:nth-of-type(3) {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 70px;
    padding: 8px 6px;
    text-align: center;
  }

  .category-world-lens__node strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 9px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .category-world-lens__detail {
    min-height: 108px;
    padding: 13px 4px 4px;
  }

  .category-world-chapter {
    padding: 38px 0;
  }

  .category-world-section-head {
    margin-bottom: 20px;
  }

  .category-world-section-head h2 {
    font-size: 34px;
    line-height: 1.04;
  }

  .category-world-section-head > p {
    font-size: 14px;
    line-height: 1.55;
  }

  .category-world-path__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-world-path__steps li,
  .category-world-path__steps li:first-child {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--cw-line);
  }

  .category-world-path__steps li:last-child { border-bottom: 0; }

  body[data-atlas-category-world="v2"] .category-world-pulse .atlas-pulse-strip {
    grid-auto-columns: minmax(238px, 84vw);
  }

  .category-world-lanes {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(152px, 44vw);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
  }

  .category-world-lane {
    min-height: 124px;
    scroll-snap-align: start;
  }

  body[data-atlas-category-world="v2"] .category-world-directory {
    padding-bottom: 40px;
  }

  body[data-atlas-category-world="v2"] .category-world-directory .sym-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-atlas-category-world="v2"] .category-world-directory .sym-card {
    min-height: 122px;
  }
}

@media (max-width: 370px) {
  .category-world-hero h1 { font-size: 42px; }
  .category-world-hero__proof dd { font-size: 12px; }
  .category-world-lens__node strong { font-size: 8px; }
  body[data-atlas-category-world="v2"] .category-world-directory .sym-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 2500px) {
  body[data-atlas-category-world="v2"] .category-world-page {
    max-width: 2320px;
    padding-top: 70px;
  }

  .category-world-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(760px, 0.82fr);
    gap: 110px;
    min-height: 850px;
  }

  .category-world-hero h1 {
    max-width: 1180px;
    font-size: 112px;
  }

  .category-world-hero__copy > p:not(.category-world-eyebrow) {
    max-width: 1080px;
    font-size: 27px;
  }

  .category-world-hero__actions a { min-height: 62px; padding: 0 26px; font-size: 15px; }
  .category-world-hero__proof dd { font-size: 25px; }
  .category-world-lens { padding: 34px; }
  .category-world-lens__field { min-height: 540px; }
  .category-world-lens__core { width: 190px; height: 190px; }
  .category-world-lens__core img { width: 112px; height: 112px; }
  .category-world-lens__node { width: 250px; min-height: 72px; }
  .category-world-lens__node strong { font-size: 16px; }
  .category-world-lens__detail { min-height: 132px; }
  .category-world-lens__detail strong { font-size: 21px; }
  .category-world-lens__detail p { font-size: 18px; }
  .category-world-chapter { padding: 86px 0; }
  .category-world-section-head h2 { max-width: 1120px; font-size: 64px; }
  .category-world-section-head > p { font-size: 21px; }
  .category-world-path__steps strong { font-size: 23px; }
  .category-world-path__steps p { font-size: 18px; }
  .category-world-lanes { gap: 14px; }
  .category-world-lane { min-height: 174px; padding: 22px; }
  .category-world-lane strong { font-size: 20px; }
  body[data-atlas-category-world="v2"] .category-world-directory .sym-search { min-height: 68px; font-size: 21px; }
  body[data-atlas-category-world="v2"] .category-world-directory .sym-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .category-world-lens.is-scanning .category-world-lens__core,
  .category-world-lens__node,
  .category-world-lane,
  .category-world-hero__actions a {
    animation: none !important;
    transition: none !important;
  }
}
