.insights-evolved-page {
  --insights-bg: #151126;
  --insights-surface: #29253c;
  --insights-surface-strong: #322e49;
  --insights-text: #fbf9ff;
  --insights-muted: #aaa5b8;
  --insights-line: rgba(255, 255, 255, .11);
  background:
    radial-gradient(circle at 82% 18%, rgba(124, 96, 167, .2), transparent 27%),
    radial-gradient(circle at 10% 63%, rgba(82, 134, 154, .11), transparent 26%),
    var(--insights-bg);
  color: var(--insights-text);
}

.insights-evolved-page .page-shell {
  padding: max(82px, calc(env(safe-area-inset-top) + 68px)) 0 max(92px, calc(env(safe-area-inset-bottom) + 72px));
}

.insights-evolved-page .page-content {
  width: min(100%, 430px);
  min-height: 100%;
  margin: 0 auto;
}

.insights-evolved-page .page-back {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
}

.insights-shell,
.insight-detail-shell,
.insight-path-shell {
  padding: 0 20px 28px;
}

.insights-header {
  margin-bottom: 24px;
}

.insights-header h1,
.insight-detail-shell h1,
.insight-path-shell h1 {
  margin: 4px 0 10px;
  color: inherit;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.insights-header > p:last-child {
  max-width: 340px;
  margin: 0;
  color: var(--insights-muted);
  font-size: 13px;
  line-height: 1.65;
}

.insights-header.compact h1 {
  font-size: 34px;
}

.insights-kicker {
  margin: 0 0 8px;
  color: #bbb4cd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  line-height: 1.45;
  text-transform: uppercase;
}

.constellation-panel {
  position: relative;
  margin: 0 0 18px;
  padding: 17px 16px 13px;
  overflow: hidden;
  border: 1px solid var(--insights-line);
  border-radius: 27px;
  background:
    radial-gradient(circle at 50% 46%, rgba(132, 167, 205, .18), transparent 28%),
    radial-gradient(circle at 29% 67%, rgba(196, 170, 112, .15), transparent 25%),
    linear-gradient(145deg, #353148, #4b435b 64%, #302c42);
  box-shadow: 0 22px 48px rgba(4, 2, 20, .22);
}

.constellation-panel::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .66) 0 1px, transparent 1.6px),
    radial-gradient(circle at 82% 64%, rgba(255, 236, 176, .55) 0 1px, transparent 1.6px);
  background-size: 87px 91px, 113px 121px;
  content: "";
  opacity: .35;
  pointer-events: none;
}

.constellation-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ddd8e8;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.constellation-heading small {
  color: #aaa4ba;
  font-size: 9px;
}

.constellation-panel h2 {
  position: relative;
  z-index: 2;
  max-width: 270px;
  margin: 7px 0 1px;
  color: #fff;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.28;
}

.constellation-wheel {
  position: relative;
  z-index: 2;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.constellation-wheel > svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.constellation-orbit,
.constellation-line {
  fill: none;
  stroke: rgba(255, 255, 255, .21);
  stroke-width: 1.2;
  stroke-dasharray: 8 7;
}

.constellation-line {
  stroke: rgba(255, 255, 255, .34);
  stroke-dasharray: none;
}

.constellation-line.faint {
  stroke: rgba(255, 255, 255, .1);
}

.orbit-two {
  stroke: rgba(255, 255, 255, .08);
  stroke-dasharray: 3 8;
}

.constellation-node {
  position: absolute;
  z-index: 3;
  left: var(--node-x);
  top: var(--node-y);
  min-width: 72px;
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 3px 5px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.constellation-node svg,
.insight-card-glyph svg,
.insight-detail-mark svg {
  width: 31px;
  height: 31px;
  overflow: visible;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 7px var(--node-color, var(--insight-color)));
}

.constellation-node svg {
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--node-color) 62%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--node-color) 70%, transparent);
}

.constellation-node span {
  display: block;
  max-width: 76px;
  margin-top: 3px;
  color: #ddd9e6;
  font-size: 9px;
  font-weight: 720;
  line-height: 1.2;
}

.constellation-node:hover,
.constellation-node.active {
  transform: translate(-50%, -50%) scale(1.06);
  background: rgba(255, 255, 255, .09);
}

.constellation-node.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.constellation-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 242, 191, .48), rgba(255, 255, 255, .04) 54%, transparent 70%);
}

.constellation-core svg {
  width: 20px;
  fill: none;
  stroke: #fff6d5;
  stroke-width: 1.3;
  filter: drop-shadow(0 0 8px rgba(255, 226, 155, .75));
}

.constellation-help {
  position: relative;
  z-index: 2;
  margin: -3px 0 0;
  color: #aaa4b8;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.insight-path-card,
.insight-card,
.insight-chat-button {
  width: 100%;
  min-height: 68px;
  display: grid;
  align-items: center;
  border: 1px solid var(--insights-line);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.insight-path-card {
  grid-template-columns: 43px minmax(0, 1fr) 24px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 13px 13px;
  border-radius: 20px;
  background: rgba(49, 45, 70, .78);
}

.insight-path-level {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 5px solid #7fc3ef;
  border-right-color: rgba(255, 255, 255, .12);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 760;
}

.insight-path-card span:nth-child(2) {
  min-width: 0;
}

.insight-path-card small,
.insight-path-card strong,
.insight-path-card em {
  display: block;
}

.insight-path-card small {
  color: #aaa4ba;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: .14em;
}

.insight-path-card strong {
  margin: 3px 0;
  font-size: 13px;
}

.insight-path-card em {
  overflow: hidden;
  color: #938da2;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-path-card > svg,
.insight-card > svg,
.insight-chat-button > svg:last-child {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.insight-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 1px 12px;
}

.insight-section-title small {
  color: #9f99ae;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.insight-section-title h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 22px;
  font-weight: 710;
}

.insight-section-title button {
  min-height: 48px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #d2cce0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.insight-card-list {
  display: grid;
  gap: 10px;
}

.insight-card {
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 11px;
  min-height: 105px;
  padding: 14px 12px;
  border-radius: 20px;
  background: var(--insights-surface);
  box-shadow: 0 14px 30px rgba(4, 2, 20, .14);
}

.insight-card-glyph {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--insight-color) 25%, transparent);
}

.insight-card-copy {
  min-width: 0;
}

.insight-card-copy small,
.insight-card-copy strong,
.insight-card-copy em {
  display: block;
}

.insight-card-copy small {
  color: var(--insight-color);
  font-size: 9px;
  font-weight: 780;
}

.insight-card-copy strong {
  margin: 5px 0 7px;
  color: #fff;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42;
}

.insight-card-copy em {
  color: #9f99ae;
  font-size: 9px;
  font-style: normal;
}

.insights-boundary,
.insight-detail-boundary {
  max-width: 330px;
  margin: 22px auto 0;
  color: #858092;
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.insights-offline-notice {
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid rgba(246, 202, 125, .22);
  border-radius: 14px;
  background: rgba(246, 202, 125, .08);
  color: #d9cfb2;
  font-size: 10px;
  line-height: 1.5;
}

.insights-offline-notice button {
  min-height: 48px;
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: #fff1c9;
  font-weight: 800;
  cursor: pointer;
}

.insight-filter-row {
  display: flex;
  gap: 7px;
  margin: 0 -20px 18px;
  padding: 0 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.insight-filter-row::-webkit-scrollbar {
  display: none;
}

.insight-filter-row button {
  min-height: 48px;
  display: inline-flex;
  flex: none;
  gap: 6px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--insights-line);
  border-radius: 999px;
  background: var(--insights-surface);
  color: #c4bece;
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}

.insight-filter-row button.active {
  border-color: rgba(255, 255, 255, .42);
  background: #fff;
  color: #201c33;
}

.insight-filter-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--category-color);
}

.insights-home-button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.insight-detail {
  background:
    repeating-radial-gradient(ellipse at 24% 38%, transparent 0 38px, rgba(82, 77, 68, .045) 39px 41px, transparent 42px 76px),
    #faf8f1;
  color: #3d3845;
}

.insight-detail .page-back {
  background: rgba(255, 255, 255, .9);
  color: #302c3f;
  box-shadow: 0 8px 22px rgba(45, 38, 36, .09);
}

.insight-detail-shell {
  --insight-color: #9bdd78;
  padding-bottom: 36px;
}

.insight-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9c968d;
  font-size: 11px;
  font-weight: 700;
}

.insight-detail-meta span:last-child {
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--insight-color) 18%, #fff);
  color: color-mix(in srgb, var(--insight-color) 72%, #493e42);
}

.insight-detail-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 50px 0 16px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--insight-color) 21%, #fff);
}

.insight-detail-mark svg {
  width: 43px;
  height: 43px;
  stroke: color-mix(in srgb, var(--insight-color) 78%, #473c49);
  filter: none;
}

.insight-detail-overline {
  margin: 0 0 7px;
  color: color-mix(in srgb, var(--insight-color) 70%, #64575e);
  font-size: 9px;
  font-weight: 840;
  letter-spacing: .15em;
}

.insight-detail-shell h1 {
  max-width: 330px;
  font-size: 38px;
}

.insight-detail-summary {
  margin: 18px 0 0;
  color: #4e4650;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 22px;
  line-height: 1.55;
}

.insight-detail-rule {
  height: 1px;
  margin: 30px 0;
  background: rgba(64, 58, 61, .1);
}

.insight-detail-body {
  margin: 0;
  color: #655e63;
  font-size: 15px;
  line-height: 1.8;
}

.insight-focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0;
}

.insight-focus-grid > div {
  min-height: 132px;
  padding: 15px;
  border: 1px solid rgba(62, 56, 60, .08);
  border-radius: 20px;
  background: rgba(255, 255, 255, .62);
}

.focus-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
}

.focus-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.3;
}

.focus-icon.plus {
  background: #b3dd44;
  color: #fff;
}

.focus-icon.minus {
  border: 2px solid #ed635f;
  color: #ed635f;
}

.insight-focus-grid small,
.insight-focus-grid strong {
  display: block;
}

.insight-focus-grid small {
  color: #918b88;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .1em;
}

.insight-focus-grid strong {
  margin-top: 7px;
  color: #3d3845;
  font-size: 14px;
  line-height: 1.35;
}

.insight-feedback-card {
  padding: 20px 16px 16px;
  border: 1px solid rgba(63, 57, 60, .08);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(76, 63, 60, .07);
}

.insight-feedback-card > small {
  color: #9d9692;
  font-size: 8px;
  font-weight: 830;
  letter-spacing: .14em;
}

.insight-feedback-card h2 {
  margin: 5px 0 15px;
  color: #393441;
  font-size: 18px;
}

.insight-feedback-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.insight-feedback-actions button {
  min-height: 70px;
  display: grid;
  place-items: center;
  padding: 8px 4px;
  border: 1px solid rgba(62, 56, 61, .1);
  border-radius: 15px;
  background: #f7f5f0;
  color: #69626c;
  font-size: 9px;
  font-weight: 730;
  cursor: pointer;
}

.insight-feedback-actions button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.insight-feedback-actions button.active {
  border-color: color-mix(in srgb, var(--insight-color) 72%, #6c6272);
  background: color-mix(in srgb, var(--insight-color) 16%, #fff);
  color: #393441;
}

.insight-feedback-actions button:disabled {
  cursor: wait;
  opacity: .55;
}

.insight-feedback-card > p {
  min-height: 15px;
  margin: 11px 0 0;
  color: #938c90;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.insight-chat-button {
  grid-template-columns: 34px minmax(0, 1fr) 21px;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 20px;
  background: #2c2841;
  color: #fff;
}

.insight-chat-button > svg:first-child {
  width: 27px;
  fill: none;
  stroke: #b9dcce;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.insight-chat-button small,
.insight-chat-button strong {
  display: block;
}

.insight-chat-button small {
  color: #a8a2b4;
  font-size: 7px;
  font-weight: 830;
  letter-spacing: .12em;
}

.insight-chat-button strong {
  margin-top: 3px;
  font-size: 12px;
}

.insight-detail-boundary {
  color: #96908d;
}

.insight-path {
  background:
    repeating-radial-gradient(ellipse at 30% 40%, transparent 0 36px, rgba(77, 83, 91, .05) 37px 39px, transparent 40px 72px),
    #faf8f1;
  color: #34303f;
}

.insight-path .page-back {
  background: rgba(255, 255, 255, .88);
  color: #302c3f;
}

.insight-path-shell {
  padding-top: 30px;
}

.path-compass {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 34px 0 14px;
  border-radius: 18px;
  background: #ebe7dc;
}

.path-compass svg {
  width: 32px;
  fill: none;
  stroke: #393443;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.insight-path-shell h1 {
  max-width: 330px;
  font-size: 38px;
}

.path-summary {
  margin: 18px 0 0;
  color: #605a61;
  font-size: 16px;
  line-height: 1.72;
}

.path-progress-card,
.path-timeline {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(62, 56, 60, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
}

.path-progress-heading {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.path-progress-heading > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 2px solid #3e3948;
  border-radius: 12px;
  font-weight: 800;
}

.path-progress-heading > span b {
  transform: rotate(-45deg);
  font: inherit;
}

.path-progress-heading small,
.path-progress-heading strong {
  display: block;
}

.path-progress-heading small {
  color: #9c9692;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: .13em;
}

.path-progress-heading strong {
  margin-top: 5px;
  font-size: 13px;
}

.path-progress-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin: 22px 0 12px;
}

.path-progress-track i {
  height: 9px;
  border-radius: 999px;
  background: #e4e1da;
}

.path-progress-track i.complete {
  background: linear-gradient(90deg, #a8d94b, #7fc3ef);
}

.path-progress-card p {
  margin: 0;
  color: #8f898a;
  font-size: 10px;
  line-height: 1.5;
}

.path-timeline h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.path-timeline > div {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(62, 56, 60, .08);
  color: #716a70;
  font-size: 12px;
}

.path-timeline strong {
  color: #37323f;
}

.insight-path .insights-home-button {
  border-color: transparent;
  background: #2c2841;
}

.insights-state-card {
  margin-top: 80px;
  padding: 26px 20px;
  border: 1px solid var(--insights-line);
  border-radius: 24px;
  background: var(--insights-surface);
  text-align: center;
}

.insights-state-card > svg {
  width: 46px;
  fill: none;
  stroke: #b9b1cc;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.insights-state-card h2 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.insights-state-card p {
  color: var(--insights-muted);
  font-size: 11px;
  line-height: 1.6;
}

.insights-state-card button {
  min-width: 150px;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #28233a;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
}

.insights-skeleton {
  overflow: hidden;
  border-radius: 20px;
  background: #28243b;
}

.insights-skeleton::after {
  display: block;
  width: 50%;
  height: 100%;
  transform: translateX(-130%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09), transparent);
  content: "";
  animation: insights-shimmer 1.3s ease-in-out infinite;
}

.insights-skeleton-wheel {
  height: 330px;
}

.insights-skeleton-line {
  width: 72%;
  height: 14px;
  margin: 18px 0;
}

.insights-skeleton-card {
  height: 98px;
}

.insights-empty {
  padding: 28px 16px;
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: 18px;
  color: #9f99ae;
  font-size: 11px;
  text-align: center;
}

.insights-evolved-page button:focus-visible {
  outline: 3px solid #f7d993;
  outline-offset: 3px;
}

@keyframes insights-shimmer {
  to {
    transform: translateX(230%);
  }
}

@media (max-width: 359px) {
  .insights-shell,
  .insight-detail-shell,
  .insight-path-shell {
    padding-right: 15px;
    padding-left: 15px;
  }

  .constellation-wheel {
    width: 275px;
  }

  .constellation-node {
    min-width: 64px;
  }

  .insight-detail-summary {
    font-size: 19px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .insights-evolved-page .page-shell {
    padding-top: max(66px, calc(env(safe-area-inset-top) + 54px));
  }

  .constellation-panel {
    max-width: 620px;
    margin-right: auto;
    margin-left: auto;
  }

  .constellation-wheel {
    width: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .insights-skeleton::after {
    animation: none;
  }

  .constellation-node,
  .insight-card,
  .insight-path-card {
    transition: none;
  }
}
