/* The new psychotype experience lives only in the test website. */
.psychotypes-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

.psychotypes-intro h2 {
  max-width: 400px;
  margin: 0 0 20px;
  font-size: var(--type-section);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.035em;
}

.psychotypes-intro > p {
  max-width: 360px;
  color: var(--text-muted);
  font-size: max(12px, var(--type-body));
  line-height: 1.85;
}

.psychotypes-illustration {
  position: relative;
  width: min(240px, 100%);
  margin: 20px auto 0;
}

.psychotypes-illustration img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.psychotypes-methodology { margin-top: 24px; }
.psychotypes-methodology summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin-inline: auto;
  min-height: 44px;
  padding: 6px 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}
.psychotypes-methodology summary::-webkit-details-marker { display: none; }
.psychotypes-methodology summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 4px; }
.psychotypes-methodology summary svg { flex: none; width: 18px; height: 18px; transition: transform .2s ease; }
.psychotypes-methodology details[open] summary svg { transform: rotate(180deg); }
.psychotypes-methodology ul {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 22px 24px;
  border: 1px solid #e0edf8;
  border-radius: 18px;
  background: #f3f9ff;
  list-style: none;
}
.psychotypes-methodology li {
  position: relative;
  min-width: 0;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: max(12px, var(--type-body));
  line-height: 1.8;
  overflow-wrap: break-word;
}
.psychotypes-methodology li::before { position: absolute; top: .7em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #25b7ea; content: ""; }

.psychotypes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.psychotype-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 18px 8px;
  overflow: hidden;
  border: 1px solid #e2edf7;
  border-radius: 22px;
  background: linear-gradient(140deg, #ffffff 35%, #f4fbff);
  box-shadow: 0 12px 28px #0a659508;
}

.psychotype-card-content {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  flex: 1;
}

/* Use the full-resolution transparent originals without cropping their artwork. */
.psychotype-portrait {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.psychotype-card-copy { min-width: 0; }
.psychotype-card-copy h3 {
  margin: 1px 0 8px;
  font-size: var(--type-card);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: normal;
}

.psychotype-card-copy > p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.65;
}

.psychotype-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 13px 0 8px;
  padding: 0;
  list-style: none;
}

.psychotype-tags li {
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 20px;
  color: #2157a5;
  background: #edf4ff;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: normal;
  white-space: nowrap;
}

.psychotype-tags li:nth-child(2) { color: #11639b; background: #e7f4ff; }
.psychotype-tags li:nth-child(3) { color: #2756a6; background: #e3eeff; }

.psychotype-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin-top: 13px;
  padding: 7px 0;
  border-top: 1px solid #eaf2f9;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.psychotype-open::after { position: absolute; inset: 0; content: ""; }
.psychotype-open > span {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #eaf5ff;
  place-items: center;
}
.psychotype-open svg { width: 13px; height: 13px; }
.psychotype-card:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }

.psychotype-dialog {
  width: min(1080px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce9f5;
  border-radius: 24px;
  color: var(--navy);
  background: #fbfdff;
  box-shadow: 0 28px 110px #00114933;
}
.psychotype-dialog::backdrop { background: #03133e94; backdrop-filter: blur(5px); }
.psychotype-dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 12px 24px;
  border-bottom: 1px solid #e6eef7;
  background: #fbfdfff5;
}
.psychotype-dialog-header > p { color: var(--blue); font-size: 11px; line-height: 1.6; }
.psychotype-close {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #d8e5f3;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  place-items: center;
}
.psychotype-close svg { width: 24px; height: 24px; }
.psychotype-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: 24px;
  padding: 26px;
}
.psychotype-profile { min-width: 0; }
.psychotype-profile .psychotype-portrait { width: 250px; margin: 0 auto 18px; }
.psychotype-profile h2 { font-size: 23px; font-weight: 600; line-height: 1.4; overflow-wrap: normal; }
.psychotype-profile > p { margin-top: 12px; color: var(--text-muted); font-size: 12px; line-height: 1.8; }
.psychotype-profile .psychotype-tags li { font-size: 10px; }
.psychotype-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.psychotype-detail {
  min-width: 0;
  height: 100%;
  padding: 18px;
  border: 1px solid #e0edf8;
  border-radius: 16px;
  background: white;
}
.psychotype-detail h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--blue); font-size: 15px; font-weight: 600; line-height: 1.5; }
.psychotype-detail h3 > span:last-child { min-width: 0; overflow-wrap: normal; word-break: normal; }
.psychotype-detail-icon { flex: 0 0 44px; width: 44px; height: 44px; overflow: hidden; border-radius: 10px; background: #fff; }
/* Keep the supplied PNG files intact; trim only their empty outer margins in CSS. */
.psychotype-detail-icon img { width: 100%; max-width: none; height: 100%; object-fit: contain; transform: scale(1.25); mix-blend-mode: multiply; }
.psychotype-detail p,
.psychotype-detail li { font-size: 12px; line-height: 1.9; }
.psychotype-detail ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.psychotype-detail li { position: relative; padding-left: 14px; }
.psychotype-detail li::before { position: absolute; top: .75em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #25b7ea; content: ""; }
.psychotype-message { height: auto; margin-top: 18px; border-left: 3px solid #25b7ea; background: #edf7ff; }
.psychotype-message blockquote { margin: 0; color: var(--navy); font-size: 15px; font-weight: 600; line-height: 1.8; }
.psychotype-message p { margin-top: 7px; color: var(--text-muted); font-size: 12px; }
body.psychotype-is-open { overflow: hidden; }

@media (max-width: 1120px) {
  .psychotypes-layout { grid-template-columns: 1fr; }
  .psychotypes-intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px 28px; align-items: center; }
  .psychotypes-intro h2 { grid-column: 1; align-self: end; margin: 0; }
  .psychotypes-intro > p { grid-column: 1; align-self: start; max-width: none; }
  .psychotypes-illustration { grid-column: 2; grid-row: 1 / 3; width: min(220px, 100%); margin: 0; }
  .psychotype-card-content { grid-template-columns: 170px minmax(0, 1fr); }
  .psychotype-card-content > .psychotype-portrait { width: 170px; }
  .psychotype-card-copy > p { font-size: 12px; }
  .psychotype-tags li { font-size: 10px; }
}

@media (min-width: 761px) and (max-width: 960px) {
  .psychotype-details { grid-template-columns: 1fr; }
  .psychotype-card-content { grid-template-columns: 1fr; }
  .psychotype-card-content > .psychotype-portrait { margin-inline: auto; }
}

@media (max-width: 760px) {
  .psychotypes-intro { display: block; }
  .psychotypes-intro h2 { margin-bottom: 15px; }
  .psychotypes-intro > p { max-width: 520px; }
  .psychotypes-illustration { margin: 20px auto 0; }
  .psychotypes-methodology { margin-top: 20px; }
  .psychotypes-methodology ul { padding: 18px 16px; }
  .psychotypes-grid { grid-template-columns: 1fr; gap: 14px; }
  .psychotype-card { padding: 18px 18px 8px; }
  .psychotype-card-content { grid-template-columns: 130px minmax(0, 1fr); gap: 12px 15px; }
  .psychotype-card-content > .psychotype-portrait { grid-column: 1; grid-row: 1 / 3; width: 130px; }
  .psychotype-card-copy { display: contents; }
  .psychotype-card-copy h3 { grid-column: 2; grid-row: 1; margin-bottom: 0; font-size: 14px; }
  .psychotype-card-copy > p { grid-column: 2; grid-row: 2; font-size: 12px; }
  .psychotype-card-copy > .psychotype-tags { grid-column: 1 / -1; grid-row: 3; margin-block: 0; }
  .psychotype-tags { gap: 5px; }
  .psychotype-tags li { padding: 5px 8px; font-size: 10px; }
  .psychotype-open { font-size: 11px; }
  .psychotype-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .psychotype-dialog-header { padding: 10px 14px; min-height: 65px; }
  .psychotype-dialog-header > p { font-size: 10px; }
  .psychotype-dialog-layout { grid-template-columns: 1fr; gap: 18px; padding: 18px 14px; }
  .psychotype-profile { display: flex; flex-direction: column; gap: 12px; }
  .psychotype-profile .psychotype-portrait { width: 208px; margin: 0 auto; }
  .psychotype-profile h2 { font-size: 22px; }
  .psychotype-profile > p { margin: 0; font-size: 12px; line-height: 1.7; }
  .psychotype-profile .psychotype-tags { margin: 0; }
  .psychotype-profile .psychotype-tags li { font-size: 10px; }
  .psychotype-details { grid-template-columns: 1fr; gap: 10px; }
  .psychotype-detail { padding: 16px; }
  .psychotype-detail h3 { font-size: 14px; }
  .psychotype-detail p, .psychotype-detail li { font-size: 12px; }
  .psychotype-message blockquote { font-size: 13px; }
  .psychotype-profile .psychotype-message { margin-top: 0; }
}

/* Make room for the sixth section without shrinking navigation text. */
@media (min-width: 901px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; }
  .desktop-nav { justify-self: center; gap: clamp(14px, 1.7vw, 25px); }
  .desktop-nav a { white-space: nowrap; }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .header-inner { gap: 18px; }
  .desktop-nav { gap: 14px; }
}

@media (max-width: 359px) {
  .psychotype-card-content { grid-template-columns: 1fr; gap: 11px; }
  .psychotype-card-content > .psychotype-portrait { grid-column: auto; grid-row: auto; width: 160px; margin-inline: auto; }
  .psychotype-card { padding-inline: 14px; }
  .psychotype-card-copy { display: block; }
  .psychotype-card-copy h3 { margin-bottom: 8px; font-size: 14px; }
  .psychotype-card-copy > .psychotype-tags { margin-top: 13px; }
  .psychotype-profile .psychotype-portrait { width: 190px; }
  .psychotype-profile h2 { font-size: 21px; }
}
