:root {
  color-scheme: light;
  --bg: #f3f7f5;
  --surface: #ffffff;
  --surface-soft: #e9f1ec;
  --ink: #111d18;
  --muted: #617169;
  --line: #d8e2dc;
  --green: #146f48;
  --blue: #245f8f;
  --amber: #ad6425;
  --coral: #c6574b;
  --violet: #5c58a7;
  --teal: #168177;
  --navy: #14243a;
  --red: #a33a3a;
  --shadow: 0 22px 54px rgba(25, 44, 36, 0.1);
  --shadow-soft: 0 12px 28px rgba(25, 44, 36, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(20, 111, 72, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 95, 143, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdfb 0, #f4f8f5 390px, #edf4f1 100%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--blue);
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 48px;
}

.topbar,
.results-head,
.nav-row,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.actions {
  flex-wrap: wrap;
}

.results-view > *,
.summary-panel > * {
  min-width: 0;
}

.topbar,
.results-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.topbar {
  min-height: 56px;
  position: sticky;
  top: 10px;
  z-index: 5;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(216, 226, 220, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(22, 38, 31, 0.06);
}

.results-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  position: relative;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark::before {
  content: "";
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  display: block;
  transform-origin: 50% 52.6%;
  background: url("/assets/brand/selfsonar-mark-3-1-orbit.png") center / contain no-repeat;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 54px;
  height: 54px;
  pointer-events: none;
  transform: translateY(-50%);
  background: url("/assets/brand/selfsonar-mark-3-1-center.png") center / contain no-repeat;
}

.brand-mark:hover::before,
.brand-mark:focus-visible::before {
  animation: selfsonarLogoOrbit 1.85s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes selfsonarLogoOrbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark:hover::before,
  .brand-mark:focus-visible::before {
    animation: none;
  }
}

.brand-mark span {
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-mark small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  min-height: 40px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.language-switcher-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.language-switcher select {
  min-width: 118px;
  min-height: 30px;
  padding: 0 30px 0 10px;
  border: 0;
  border-radius: 7px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 15px) 12px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 11px) 12px / 6px 6px no-repeat,
    #f6faf8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  appearance: none;
  cursor: pointer;
}

.language-switcher select:focus-visible {
  outline: 2px solid rgba(36, 95, 143, 0.28);
  outline-offset: 2px;
}

.language-switcher select:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.i18n-missing {
  color: #b42318 !important;
  outline: 1px dashed #f04438;
  outline-offset: 2px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: #f2f7f4;
  outline: 2px solid transparent;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.notice,
.legal-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d9caa7;
  border-radius: 8px;
  background: #fff8e8;
  color: #51452a;
  line-height: 1.45;
}

.notice a,
.legal-note a,
.method-note a,
.methodology-footnote a,
.start-legal-note a,
.prompt-privacy-note a {
  color: #5b21b6;
  font-weight: 850;
  text-decoration: none;
}

.notice a:hover,
.legal-note a:hover,
.method-note a:hover,
.methodology-footnote a:hover,
.start-legal-note a:hover,
.prompt-privacy-note a:hover {
  text-decoration: underline;
}

.start-legal-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.legal-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.legal-hero {
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 14%, rgba(124, 58, 237, 0.12), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(34, 197, 94, 0.1), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7f5ff 48%, #f1fbf6 100%);
  box-shadow: var(--shadow);
}

.legal-hero h1 {
  max-width: 820px;
  margin: 6px 0 12px;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
}

.legal-hero p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.legal-block {
  padding: 22px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.legal-wide {
  margin-top: 16px;
}

.legal-block h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.legal-block p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.62;
}

.legal-block p:last-child,
.legal-block ul:last-child {
  margin-bottom: 0;
}

.legal-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.legal-block li + li {
  margin-top: 8px;
}

.legal-block a {
  color: #5b21b6;
  font-weight: 850;
  text-decoration: none;
}

.legal-block a:hover {
  text-decoration: underline;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.legal-links a:hover {
  border-color: #c4b5fd;
  color: #5b21b6;
}

.source-list {
  display: grid;
  gap: 8px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 32px));
  margin: 8px auto 0;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  color: var(--ink);
  font-size: 16px;
}

.site-footer span {
  font-size: 13px;
  line-height: 1.4;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
}

.site-footer a {
  color: #4b5563;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #5b21b6;
  text-decoration: underline;
}

.intro-panel,
.test-view,
.summary-panel,
.detail-section,
.question-panel,
.progress-panel,
.score-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.78fr);
  gap: 30px;
  align-items: start;
  margin: 18px 0 34px;
  padding: 42px 0 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-intro {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.78fr);
  gap: 32px;
}

.home-intro .hero-copy {
  max-width: 720px;
}

@media (max-width: 960px) {
  .home-intro {
    grid-template-columns: 1fr;
  }
}

.big-five-landing {
  align-items: start;
}

.test-seo-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.test-seo-block article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.test-seo-block span {
  display: block;
  margin-bottom: 10px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.test-seo-block h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.test-seo-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.methodology-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 28px;
  margin-top: 24px;
  scroll-margin-top: 80px;
}

.methodology-head {
  display: grid;
  gap: 10px;
}

.methodology-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  color: var(--ink);
}

.methodology-head p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.methodology-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.methodology-cards article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
}

.methodology-cards .eyebrow {
  margin: 0;
  color: #7c3aed;
}

.methodology-cards h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
}

.methodology-cards p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}

.methodology-benefits {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid #dfe9f6;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.92)),
    #f7fbff;
  box-shadow: 0 24px 60px rgba(38, 76, 118, 0.1);
}

.methodology-benefits-head {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.methodology-benefits-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 4px 14px 4px 6px;
  border: 1px solid rgba(99, 145, 226, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #497fe6;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.methodology-benefits-pill-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.methodology-benefits-pill-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.methodology-benefits-head h3 {
  max-width: 860px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.methodology-benefits-head p {
  max-width: 760px;
  margin: 0;
  color: #52627a;
  font-size: 18px;
  line-height: 1.55;
}

.methodology-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(940px, 100%);
  margin: 0 auto;
}

.methodology-benefit-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 138px;
  padding: 18px 24px;
  border: 1px solid rgba(196, 213, 236, 0.84);
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.88)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(31, 64, 104, 0.08);
}

.methodology-benefit-card-wide {
  grid-column: 1 / -1;
}

.methodology-benefit-icon {
  display: block;
  width: 88px;
  height: 88px;
}

.methodology-benefit-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.methodology-benefit-card h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.16;
}

.methodology-benefit-card p {
  margin: 0;
  color: #4b5d75;
  font-size: 16px;
  line-height: 1.45;
}

.methodology-benefits-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 16px 20px;
  border: 1px solid rgba(196, 213, 236, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #52627a;
  font-size: 15px;
  line-height: 1.45;
}

.methodology-benefits-note-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.methodology-benefits-note-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.methodology-footnote {
  margin: 0;
  max-width: 760px;
  line-height: 1.5;
}

.methodology-footnote a {
  color: #7c3aed;
}

.observer-entry-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 12px;
  padding: 32px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.06), transparent 48%),
    linear-gradient(120deg, rgba(20, 111, 72, 0.05), transparent 58%),
    rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 88px;
}

.observer-entry-copy {
  display: grid;
  gap: 14px;
  align-content: center;
}

.observer-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0 0 4px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: #4c1d95;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.observer-eyebrow-icon {
  display: block;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(76, 29, 149, 0.08);
}

.observer-entry-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 720px;
}

.observer-entry-copy > p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.observer-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.observer-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(20, 111, 72, 0.06);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.observer-privacy-icon {
  flex-shrink: 0;
  display: block;
  width: 22px;
  height: 22px;
}

.observer-entry-card {
  display: grid;
  gap: 16px;
  align-content: flex-start;
  padding: 22px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 46px rgba(25, 44, 36, 0.08);
}

.observer-card-label {
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.observer-entry-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.observer-entry-rows {
  display: grid;
  gap: 10px;
}

.observer-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 226, 220, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.observer-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(25, 44, 36, 0.06);
}

.observer-row-icon {
  flex-shrink: 0;
  display: block;
  width: 40px;
  height: 40px;
}

.observer-row-copy {
  display: grid;
  gap: 4px;
}

.observer-row-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.observer-row-copy span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

.observer-bottom-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 4px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.observer-bottom-cta .primary-button {
  flex-shrink: 0;
}

.observer-bottom-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 260px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.observer-bottom-icon {
  flex-shrink: 0;
  display: block;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
}

@media (max-width: 880px) {
  .methodology-cards,
  .methodology-benefits-grid,
  .observer-entry-section {
    grid-template-columns: 1fr;
  }

  .methodology-benefits {
    padding: 24px;
  }

  .methodology-benefits-head h3 {
    font-size: clamp(30px, 8vw, 44px);
  }

  .observer-entry-section {
    padding: 22px;
    gap: 18px;
  }

  .observer-entry-card {
    padding: 18px;
  }

  .observer-bottom-cta {
    padding: 16px 18px;
  }
}

@media (max-width: 560px) {
  .methodology-benefits {
    padding: 18px;
    border-radius: 14px;
  }

  .methodology-benefits-head {
    text-align: left;
    justify-items: start;
  }

  .methodology-benefits-pill {
    font-size: 13px;
  }

  .methodology-benefits-head p {
    font-size: 16px;
  }

  .methodology-benefit-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    min-height: auto;
    padding: 16px;
  }

  .methodology-benefit-icon {
    width: 64px;
    height: 64px;
  }

  .methodology-benefit-card h4 {
    font-size: 18px;
  }

  .methodology-benefit-card p {
    font-size: 14px;
  }

  .methodology-benefits-note {
    align-items: flex-start;
    padding: 14px;
    font-size: 14px;
  }
}

.intro-panel::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw) auto;
  height: min(100%, 620px);
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(20, 111, 72, 0.11), transparent 36%),
    linear-gradient(160deg, rgba(36, 95, 143, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  border-bottom: 1px solid rgba(216, 226, 220, 0.7);
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0 0 14px;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 0 20px;
  color: #45534c;
  font-size: 19px;
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
  margin-bottom: 16px;
}

.hero-metrics div,
.method-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(25, 44, 36, 0.055);
}

.hero-metrics div {
  min-height: 84px;
  padding: 14px;
}

.hero-metrics strong,
.hero-metrics span,
.method-note strong,
.method-note span {
  display: block;
}

.hero-metrics strong {
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}

.hero-metrics span,
.method-note span {
  color: var(--muted);
  line-height: 1.4;
}

.method-note {
  max-width: 680px;
  margin-bottom: 16px;
  padding: 14px;
}

.method-note strong {
  margin-bottom: 5px;
}

.factor-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 12px;
  max-width: 1040px;
}

.factor-pill {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.factor-pill::after {
  content: "";
  display: block;
  height: 5px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), transparent 68%);
  opacity: 0.62;
}

.factor-pill:nth-child(2)::after {
  background: linear-gradient(90deg, var(--blue), transparent 72%);
}

.factor-pill:nth-child(3)::after {
  background: linear-gradient(90deg, var(--amber), transparent 58%);
}

.factor-pill:nth-child(4)::after {
  background: linear-gradient(90deg, var(--red), transparent 65%);
}

.factor-pill:nth-child(5)::after {
  background: linear-gradient(90deg, var(--violet), transparent 70%);
}

.test-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.test-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 304px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.test-card::before {
  content: "";
  height: 4px;
  position: absolute;
  inset: 0 0 auto;
  background: var(--accent, var(--line));
}

.test-card.active {
  --accent: linear-gradient(90deg, var(--green), var(--blue));
  border-color: rgba(20, 111, 72, 0.34);
}

.test-card.soon:nth-child(3n + 1) {
  --accent: var(--blue);
}

.test-card.soon:nth-child(3n + 2) {
  --accent: var(--amber);
}

.test-card.soon:nth-child(3n + 3) {
  --accent: var(--violet);
}

.test-card:hover {
  border-color: rgba(36, 95, 143, 0.35);
  box-shadow: 0 22px 48px rgba(25, 44, 36, 0.12);
  transform: translateY(-2px);
}

.test-card h3,
.test-card p {
  margin: 0;
}

.test-card h3 {
  font-size: 22px;
  line-height: 1.12;
}

.test-card p {
  color: var(--muted);
  line-height: 1.48;
}

.test-card-head,
.test-card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.test-card-head {
  justify-content: space-between;
}

.test-card-head > span:not(.status-pill),
.test-card-meta span,
.tag-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.test-card-meta span,
.tag-row span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfa;
}

.test-card .secondary-button {
  width: 100%;
  align-self: end;
  margin-top: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.available {
  background: #e6f4ec;
  color: var(--green);
}

.status-pill.soon {
  background: #f4eee6;
  color: var(--amber);
}

.catalog-section {
  position: relative;
  margin-bottom: 22px;
  padding: 28px 0 6px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head h2 {
  margin-bottom: 6px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.02;
}

.section-head p {
  max-width: 700px;
  color: var(--muted);
  line-height: 1.5;
}

.catalog-search {
  display: block;
}

.catalog-search span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.catalog-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(25, 44, 36, 0.05);
}

.category-tabs {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.category-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(25, 44, 36, 0.045);
}

.category-tabs button small {
  color: var(--muted);
  font-weight: 850;
}

.category-tabs button.active {
  border-color: rgba(20, 111, 72, 0.52);
  background: var(--ink);
  color: #ffffff;
}

.category-tabs button.active small {
  color: rgba(255, 255, 255, 0.76);
}

.featured-test {
  margin-bottom: 14px;
}

.featured-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(23, 114, 69, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 111, 72, 0.12), rgba(255, 255, 255, 0.96) 45%, rgba(36, 95, 143, 0.13)),
    var(--surface);
  box-shadow: var(--shadow);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--violet));
}

.featured-card h3,
.featured-card p {
  margin: 0;
}

.featured-card h3 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
}

.featured-card p {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.featured-card .tag-row {
  margin-top: 14px;
}

.featured-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.featured-meta div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(25, 44, 36, 0.05);
}

.featured-meta strong,
.featured-meta span {
  display: block;
}

.featured-meta strong {
  color: var(--navy);
  font-size: 24px;
}

.featured-meta span {
  color: var(--muted);
  font-size: 13px;
}

.featured-meta .primary-button,
.featured-meta .secondary-button {
  grid-column: 1 / -1;
  width: 100%;
}

.empty-catalog {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.factor-pill {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fbfcfa;
}

.factor-pill:nth-child(2) {
  border-left-color: var(--blue);
}

.factor-pill:nth-child(3) {
  border-left-color: var(--amber);
}

.factor-pill:nth-child(4) {
  border-left-color: var(--red);
}

.factor-pill strong {
  display: block;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.18;
}

.factor-pill span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.consent-box {
  position: relative;
  overflow: hidden;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow);
}

.start-card::before {
  content: "";
  height: 4px;
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.start-card::after {
  content: "5 + 30";
  position: absolute;
  right: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 42px;
  border: 1px solid rgba(36, 95, 143, 0.18);
  border-radius: 8px;
  background: #eef6f7;
  color: var(--navy);
  font-weight: 950;
}

.start-card h2,
.start-card p {
  margin: 0;
}

.start-card h2 {
  max-width: calc(100% - 94px);
  font-size: 32px;
  line-height: 1.08;
}

.start-card > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

#startTestButton {
  scroll-margin-top: 120px;
}

.start-card-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.start-card-points span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  font-weight: 800;
  font-size: 13px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  line-height: 1.45;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.personalization-box {
  display: grid;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.visual-options {
  display: grid;
  gap: 14px;
}

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

.field-grid label,
.field-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.field-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.theme-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.gender-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.gender-options button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.gender-options button:hover,
.gender-options button:focus-visible {
  border-color: var(--green);
  outline: 2px solid transparent;
}

.gender-options button.active {
  border-color: var(--green);
  background: #eef7f0;
}

.gender-options button:disabled {
  cursor: not-allowed;
  opacity: 0.74;
}

.theme-options button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.theme-options button:hover,
.theme-options button:focus-visible {
  border-color: var(--green);
  outline: 2px solid transparent;
}

.theme-options button.active {
  border-color: var(--green);
  background: #eef7f0;
}

.theme-options button:disabled,
.personalization-box.locked select {
  cursor: not-allowed;
  opacity: 0.74;
}

.theme-options strong,
.theme-options span {
  display: block;
}

.theme-options strong {
  font-size: 15px;
}

.theme-options span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.test-view {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.progress-panel {
  position: relative;
  z-index: 1;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: none;
}

.test-sonar-visual {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 0;
  width: clamp(132px, 11vw, 172px);
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 999px;
  opacity: 0.7;
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.76) 0 6px, transparent 7px),
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(38, 91, 154, 0.34) 18.5% 19.5%, transparent 20% 34%, rgba(124, 58, 237, 0.32) 34.5% 35.5%, transparent 36% 51%, rgba(20, 184, 166, 0.24) 51.5% 52.5%, transparent 53% 67%, rgba(15, 23, 42, 0.18) 67.5% 68.5%, transparent 69%),
    conic-gradient(from 6deg, rgba(15, 23, 42, 0.42) 0deg 7deg, transparent 7deg 77deg, rgba(37, 99, 235, 0.34) 77deg 83deg, transparent 83deg 166deg, rgba(20, 184, 166, 0.34) 166deg 172deg, transparent 172deg 256deg, rgba(124, 58, 237, 0.34) 256deg 262deg, transparent 262deg 360deg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.test-sonar-visual::after {
  content: "";
  position: absolute;
  inset: -10%;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  animation: testSonarPing 7.4s ease-out infinite;
}

.test-sonar-sweep {
  position: absolute;
  inset: 8%;
  display: block;
  border-radius: 999px;
  transform-origin: 50% 50%;
  background: conic-gradient(from -18deg, rgba(124, 58, 237, 0.5) 0deg 30deg, rgba(124, 58, 237, 0.22) 30deg 44deg, transparent 44deg 360deg);
  clip-path: circle(50% at 50% 50%);
  mix-blend-mode: multiply;
  animation: testSonarSweep 14s linear infinite;
}

.test-sonar-sweep::after {
  content: "";
  position: absolute;
  top: 48%;
  left: 50%;
  display: block;
  width: 45%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.72), rgba(20, 184, 166, 0));
}

.test-sonar-core,
.test-sonar-blip {
  position: absolute;
  display: block;
  border-radius: 999px;
}

.test-sonar-core {
  inset: calc(50% - 6px);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.07);
}

.test-sonar-blip {
  width: 7px;
  height: 7px;
  background: rgba(20, 184, 166, 0.78);
}

.test-sonar-blip-a {
  top: 31%;
  right: 27%;
}

.test-sonar-blip-b {
  right: 31%;
  bottom: 24%;
  background: rgba(37, 99, 235, 0.62);
}

@keyframes testSonarSweep {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

@keyframes testSonarPing {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }

  16% {
    opacity: 0.44;
  }

  80%,
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .test-sonar-sweep,
  .test-sonar-visual::after {
    animation: none;
  }

  .test-sonar-visual::after {
    display: none;
  }
}

.progress-ring {
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  border: 12px solid var(--surface-soft);
  border-top-color: var(--green);
  border-right-color: var(--blue);
  border-radius: 50%;
  text-align: center;
}

.progress-ring span {
  display: block;
  font-size: 34px;
  font-weight: 850;
}

.progress-ring small {
  color: var(--muted);
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.question-panel {
  position: relative;
  z-index: 1;
  padding: 22px;
  box-shadow: none;
}

.question-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 800;
}

.question-text {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 210px);
  min-height: 120px;
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.likert {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.likert button {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.likert button:hover,
.likert button:focus-visible {
  border-color: var(--green);
  outline: 2px solid transparent;
}

.likert button.active {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.answer-hint {
  display: none;
  margin: 0 0 12px;
  color: var(--red);
  font-weight: 750;
}

.answer-hint.visible {
  display: block;
}

.answer-hint.info {
  color: var(--blue);
}

.nav-row {
  justify-content: space-between;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(20, 111, 72, 0.2);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #a9b7ad;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  box-shadow: 0 16px 30px rgba(20, 111, 72, 0.24);
}

.secondary-button:hover {
  border-color: rgba(36, 95, 143, 0.38);
  box-shadow: 0 10px 22px rgba(25, 44, 36, 0.07);
}

.dev-helper {
  border-color: #d9caa7;
  background: #fff8e8;
  color: #51452a;
}

.secondary-button:disabled {
  color: #8a948c;
  cursor: not-allowed;
  background: #f0f2ef;
}

.disabled-link {
  color: #8a948c;
  cursor: not-allowed;
  pointer-events: none;
  background: #f0f2ef;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.results-view {
  display: grid;
  gap: 18px;
}

.results-view.has-personal-result .results-head {
  justify-content: flex-end;
  margin-bottom: 0;
}

.results-view.has-personal-result .results-head > div:first-child {
  display: none;
}

.summary-panel,
.portrait-panel,
.detail-section {
  padding: 18px;
}

.portrait-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portrait-panel h3,
.portrait-panel h4 {
  margin: 0 0 10px;
}

.portrait-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portrait-image {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.portrait-status {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid #d9caa7;
  border-radius: 8px;
  background: #fff8e8;
  color: #51452a;
}

.portrait-status strong,
.portrait-status span {
  display: block;
}

.portrait-layout ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.summary-item strong {
  display: block;
  margin-bottom: 6px;
}

.summary-panel {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.result-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(170px, 0.7fr));
  gap: 12px;
}

.result-status,
.result-kpi,
.result-brief,
.insight-card,
.quality-flags {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.result-status {
  border-left: 5px solid var(--blue);
}

.result-status-ok {
  border-left-color: var(--green);
}

.result-status-warning {
  border-left-color: var(--amber);
}

.result-status-invalid {
  border-left-color: var(--red);
}

.result-status span,
.result-kpi span,
.insight-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-status strong,
.result-kpi strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.1;
}

.result-status p,
.result-kpi small,
.result-brief p,
.insight-card p,
.quality-flags p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.result-brief p {
  color: var(--ink);
  font-size: 18px;
}

.free-scale-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.free-scale-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.free-scale-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--blue);
}

.free-scale-card strong,
.free-scale-card span {
  display: block;
}

.free-scale-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.free-scale-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.free-scale-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.insight-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.insight-card li + li {
  margin-top: 8px;
}

.quality-flags {
  border-color: #d9caa7;
  background: #fff8e8;
}

.quality-flags p + p {
  margin-top: 8px;
}

.visual-opt-in strong,
.visual-opt-in small {
  display: block;
}

.visual-opt-in strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.visual-opt-in small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.result-hero,
.personality-map,
.life-meaning {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.7fr);
  gap: 22px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(255, 255, 255, 0.98) 50%, rgba(34, 197, 94, 0.09)),
    #ffffff;
}

.result-hero-main {
  display: grid;
  align-content: start;
  gap: 12px;
}

.result-kicker,
.section-title .eyebrow {
  margin: 0;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-hero h2 {
  max-width: 820px;
  margin: 0;
  color: #111827;
  font-size: clamp(42px, 6.2vw, 82px);
  line-height: 0.98;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.result-archetype,
.result-description,
.result-label-note,
.section-title p,
.factor-card p,
.life-meaning p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-archetype {
  color: #4b5563;
  font-size: 19px;
  font-weight: 850;
}

.result-description {
  max-width: 760px;
  color: #374151;
  font-size: 18px;
}

.result-label-note {
  max-width: 760px;
  padding-top: 2px;
  font-size: 13px;
}

.result-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.result-hero-aside {
  display: grid;
  gap: 12px;
  align-content: start;
}

.result-quality,
.result-mini-formula div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.result-quality {
  border-left: 5px solid var(--blue);
}

.result-quality.result-status-ok {
  border-left-color: var(--green);
}

.result-quality.result-status-warning {
  border-left-color: var(--amber);
}

.result-quality.result-status-invalid {
  border-left-color: var(--red);
}

.result-quality span,
.result-quality strong,
.result-quality small,
.result-mini-formula strong,
.result-mini-formula span {
  display: block;
}

.result-quality span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-quality strong {
  margin: 6px 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.result-quality p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.result-quality small {
  color: #6b7280;
  font-weight: 800;
}

.result-mini-formula {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.result-mini-formula strong {
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.result-mini-formula span {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero-conclusions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-conclusions article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.hero-conclusions span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 950;
}

.hero-conclusions p {
  margin: 0;
  color: #374151;
  line-height: 1.45;
}

.personality-map,
.life-meaning {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.section-title {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.section-title h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.personality-map-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.factor-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.06);
}

.factor-card-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  min-height: 88px;
  padding-right: 48px;
}

.result-symbol {
  pointer-events: none;
}

.result-symbol svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.result-symbol .soft-fill {
  fill: #ede9fe;
}

.result-symbol .mint-fill {
  fill: #dcfce7;
}

.result-symbol .icon-line,
.result-symbol .violet-line,
.result-symbol .green-line {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-symbol .icon-line {
  stroke: #111827;
}

.result-symbol .violet-line {
  stroke: #7c3aed;
}

.result-symbol .green-line {
  stroke: #16a34a;
}

.factor-symbol,
.life-symbol {
  position: absolute;
  top: 18px;
  right: 10px;
  z-index: 0;
  width: 54px;
  aspect-ratio: 1;
  opacity: 0.95;
}

.factor-card h4,
.life-meaning h4,
.score-card h4 {
  margin: 0;
  color: #111827;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.factor-card h4 {
  position: relative;
  z-index: 1;
  font-size: 20px;
  hyphens: auto;
}

.factor-card-head span,
.factor-signal-grid span {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.factor-badge,
.highlight-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.factor-badge.muted {
  background: #f3f4f6;
  color: #4b5563;
}

.factor-score-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.factor-score-row strong {
  color: #111827;
  font-size: 26px;
  line-height: 1;
}

.factor-score-row span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.factor-card.is-top-factor {
  border-color: rgba(124, 58, 237, 0.36);
  box-shadow: 0 18px 34px rgba(124, 58, 237, 0.11);
}

.factor-card.is-low-factor {
  border-color: rgba(75, 85, 99, 0.22);
}

.radial-meter {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
    conic-gradient(#7c3aed calc(var(--value) * 1%), #eef2f7 0);
  text-align: center;
}

.radial-meter strong,
.radial-meter small {
  display: block;
  line-height: 1;
}

.radial-meter strong {
  color: #111827;
  font-size: 22px;
}

.radial-meter small {
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.factor-signal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.factor-signal-grid div {
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f9fafb;
}

.factor-signal-grid p {
  margin-top: 6px;
  font-size: 14px;
}

.factor-progress,
.share-mini-bars i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.factor-progress {
  position: relative;
  z-index: 1;
  height: 10px;
  background: #edf2f3;
}

.factor-progress span,
.share-mini-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6 0%, #0ea5a9 54%, #22c55e 100%);
}

.life-meaning-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.life-meaning article {
  position: relative;
  min-height: 190px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 24px 96px 24px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.07);
}

.life-meaning article h4,
.life-meaning article p {
  position: relative;
  z-index: 1;
}

.life-symbol {
  z-index: 2;
}

.result-hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.result-hero-copy .eyebrow,
.share-card .eyebrow {
  margin: 0;
}

.result-hero-copy h2 {
  max-width: 900px;
  margin: 0;
  color: #111827;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.result-hero-copy > p:not(.eyebrow),
.profile-disclaimer {
  max-width: 760px;
  margin: 0;
  color: #374151;
  font-size: 18px;
  line-height: 1.62;
}

.profile-disclaimer {
  color: #6b7280 !important;
  font-size: 13px !important;
}

.result-hero-card {
  display: grid;
  gap: 14px;
  align-self: stretch;
  align-content: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.08);
}

.result-hero-card > span {
  color: #7c3aed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#heroMiniBars,
.share-mini-bars,
.preview-mini-bars {
  display: grid;
  gap: 10px;
}

.mini-factor-bar,
.preview-mini-bars div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 34px minmax(100px, 1.2fr);
  gap: 10px;
  align-items: center;
}

.mini-factor-bar span,
.preview-mini-bars span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.mini-factor-bar strong,
.preview-mini-bars strong {
  color: #111827;
  text-align: right;
}

.mini-factor-bar i,
.preview-mini-bars i,
.share-mini-bars i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.mini-factor-bar b,
.preview-mini-bars b,
.share-mini-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #22c55e);
}

.key-insights,
.share-card-section,
.ai-prompt-section {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.key-insights h3,
.life-meaning > h3,
.share-card-section h3,
.ai-prompt-section h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.insight-list article {
  min-height: 190px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f9fafb),
    #ffffff;
}

.insight-list article > span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 950;
}

.insight-list h4 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.insight-list p {
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
}

.profile-standout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(20, 111, 72, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 111, 72, 0.08), rgba(255, 255, 255, 0.98) 54%, rgba(124, 58, 237, 0.08)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.profile-standout h3,
.profile-standout p {
  margin: 0;
}

.profile-standout h3 {
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

.profile-standout p {
  margin-top: 10px;
  color: #374151;
  line-height: 1.6;
}

.standout-pills {
  display: grid;
  gap: 10px;
  align-content: center;
}

.standout-pills span {
  padding: 12px 14px;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
  font-weight: 850;
}

.personality-map .section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 840px;
  margin: 0;
}

.personality-map .section-head h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.factor-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.share-card {
  width: min(100%, 620px);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.13), rgba(255, 255, 255, 0.96) 52%, rgba(34, 197, 94, 0.12)),
    #ffffff;
  box-shadow: 0 22px 48px rgba(17, 24, 39, 0.1);
}

.share-card h4 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
}

.share-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-card li {
  padding: 8px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-weight: 850;
}

.ai-prompt-section {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(255, 255, 255, 0.98) 48%, rgba(124, 58, 237, 0.08)),
    #ffffff;
}

.ai-analysis-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ai-analysis-status {
  color: var(--muted);
  font-size: 0.95rem;
}

.ai-analysis-result {
  padding: 22px;
  border: 1px solid rgba(76, 61, 186, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 255, 0.88));
  box-shadow: 0 16px 40px rgba(47, 36, 110, 0.08);
}

.ai-analysis-result p {
  margin: 0 0 14px;
  color: var(--text);
  line-height: 1.72;
}

.ai-analysis-result p:last-child {
  margin-bottom: 0;
}

.ai-analysis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-analysis-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(122, 59, 238, 0.1);
  color: #5c42b8;
  font-size: 0.82rem;
  font-weight: 800;
}

.prompt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.prompt-depth-select {
  min-width: min(100%, 260px);
  display: grid;
  gap: 7px;
}

.prompt-depth-select span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 900;
}

.prompt-depth-select select {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 850;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.prompt-actions .secondary-button {
  min-height: 44px;
}

.prompt-privacy-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  line-height: 1.45;
}

.prompt-privacy-note.compact {
  font-size: 13px;
}

.ai-copy-button {
  justify-self: start;
}

.ai-prompt-preview {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  font: 14px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.ai-prompt-preview:focus {
  outline: 3px solid rgba(124, 58, 237, 0.24);
  border-color: #7c3aed;
}

.ai-prompt-stats {
  color: #6b7280;
  font-weight: 750;
}

.pair-invite-section {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.96) 58%, rgba(237, 233, 254, 0.8)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.observer-result-section {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(20, 111, 72, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.96) 58%, rgba(239, 246, 255, 0.78)),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.observer-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.observer-result-grid article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(216, 226, 220, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.observer-result-grid span {
  color: #15803d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.observer-result-grid strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.observer-result-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.observer-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pair-invite-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.pair-invite-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.pair-invite-result div {
  display: grid;
  gap: 6px;
}

.pair-invite-result span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 850;
}

.pair-invite-result a,
.pair-invite-result strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.pair-invite-result p {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

.pair-invite-actions {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
}

.pair-code-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.pair-code-head {
  display: block;
  min-width: 0;
}

.pair-code-title {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.pair-code-info {
  display: block;
}

.pair-code-info summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  list-style: none;
}

.pair-code-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}

.pair-code-info summary::-webkit-details-marker {
  display: none;
}

.pair-code-info summary:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.2);
  outline-offset: 2px;
}

.pair-code-popover {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.pair-code-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.pair-code-box input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 850;
  text-transform: uppercase;
}

.pair-code-box input:focus {
  outline: 3px solid rgba(124, 58, 237, 0.18);
  border-color: #7c3aed;
}

#full-overview,
#factor-combinations,
#full-factors,
#facets,
#work,
#communication,
#risks,
#result-methodology {
  scroll-margin-top: 128px;
}

.pair-prompt-details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pair-prompt-details summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #111827;
  font-weight: 950;
}

.pair-prompt-config {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.pair-prompt-config p {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
}

.factor-accordion {
  display: grid;
  gap: 12px;
}

.mobile-result-actions {
  display: none;
}

.personal-profile {
  display: grid;
  gap: 16px;
}

.personal-profile-hero,
.profile-grid article,
.profile-insights article,
.profile-next,
.share-section,
.comparison-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.personal-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.11), rgba(255, 255, 255, 0.96) 50%, rgba(20, 111, 72, 0.1)),
    var(--surface);
}

.personal-profile-hero > div:first-child > span,
.profile-grid article > span,
.profile-next span,
.share-head span {
  display: block;
  margin-bottom: 8px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.personal-profile-hero h3,
.share-head h3 {
  margin: 0;
  color: var(--ink);
}

.personal-profile-hero h3 {
  overflow-wrap: anywhere;
  font-size: clamp(38px, 4.4vw, 72px);
  line-height: 1.04;
}

.personal-profile-hero p,
.profile-summary,
.profile-grid p,
.profile-insights p,
.profile-next p,
.comparison-note p,
.share-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.personal-profile-hero p {
  max-width: 680px;
  margin-top: 12px;
  font-size: 18px;
}

.profile-formula {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.profile-formula div {
  min-width: 0;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.profile-formula strong,
.profile-formula span {
  display: block;
}

.profile-formula strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.profile-formula span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
  text-transform: none;
}

.profile-summary {
  padding: 18px;
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  background: #f8f7ff;
  color: var(--ink);
  font-size: 18px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-grid article,
.profile-insights article,
.comparison-note {
  padding: 16px;
}

.profile-grid ul,
.profile-next ul,
.share-card-preview ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-grid li + li,
.profile-next li + li,
.share-card-preview li + li {
  margin-top: 7px;
}

.profile-insights {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.profile-insights strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.profile-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.profile-fit p + ul,
.profile-fit ul + ul {
  margin-top: 12px;
}

.share-section {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.share-head h3 {
  font-size: 26px;
}

.share-head p {
  max-width: 540px;
}

.share-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.share-card-preview {
  min-height: 310px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--share-accent) 10%, #ffffff), #ffffff 44%),
    var(--surface);
}

.share-card-preview > span {
  color: var(--share-accent);
  font-size: 13px;
  font-weight: 950;
}

.share-card-preview h4,
.share-card-preview p {
  margin: 0;
}

.share-card-preview h4 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.share-card-preview p,
.share-card-preview small {
  color: var(--muted);
  line-height: 1.4;
}

.share-card-preview .secondary-button {
  width: 100%;
  margin-top: auto;
}

.share-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
}

.share-logo span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 950;
}

.share-logo strong {
  font-size: 16px;
}

.share-profile-card {
  min-height: 430px;
}

.share-mini-bars {
  display: grid;
  gap: 8px;
}

.share-mini-bars div {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 34px minmax(88px, 1.2fr);
  gap: 8px;
  align-items: center;
}

.share-mini-bars span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.share-mini-bars strong {
  color: #111827;
  font-size: 14px;
  text-align: right;
}

.comparison-note {
  display: grid;
  gap: 14px;
  border-color: #e5e7eb;
  background: #f9fafb;
  box-shadow: none;
}

/* Только заголовочный strong внутри первой <div>-обёртки comparison-note
   должен быть блочным. Inline <strong> в параграфах остаётся inline. */
.comparison-note > div > strong:first-child {
  display: block;
  margin-bottom: 6px;
}

.comparison-note small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

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

.comparison-highlights article {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.comparison-highlights span,
.comparison-bars span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.comparison-highlights article strong {
  margin: 4px 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.comparison-bars {
  display: grid;
  gap: 10px;
}

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

.norm-compare-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.norm-compare-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.norm-compare-head span,
.norm-compare-head strong {
  display: block;
}

.norm-compare-head span {
  color: #111827;
  font-weight: 950;
}

.norm-compare-head strong {
  max-width: 220px;
  color: #7c3aed;
  font-size: 13px;
  text-align: right;
}

.norm-scale {
  position: relative;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.norm-zone {
  display: grid;
  place-items: center;
  color: rgba(17, 24, 39, 0.58);
  font-size: 11px;
  font-weight: 850;
}

.zone-low {
  background: #eff6ff;
}

.zone-mid {
  background: #f0fdf4;
}

.zone-high {
  background: #f5f3ff;
}

.norm-marker {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111827;
  box-shadow: 0 0 0 5px rgba(17, 24, 39, 0.1);
}

.comparison-bars > div {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) 48px minmax(160px, 1.6fr);
  gap: 10px;
  align-items: center;
}

.comparison-bars strong {
  margin: 0;
  text-align: right;
}

.comparison-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.comparison-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #146f48);
}

.comparison-warning {
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
}

.full-report-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(173, 100, 37, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.98), rgba(255, 255, 255, 0.94) 58%, rgba(36, 95, 143, 0.08)),
    #fff8e8;
  color: #51452a;
  box-shadow: var(--shadow);
}

.full-report-gate h3,
.full-report-gate p {
  margin: 0 0 8px;
}

.full-report-gate small {
  display: block;
  color: #6d5c37;
  line-height: 1.4;
}

.full-report-gate .primary-button {
  flex: 0 0 auto;
  position: sticky;
  top: 92px;
}

.gate-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.gate-benefits span {
  padding: 8px 10px;
  border: 1px solid rgba(173, 100, 37, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #51452a;
  font-size: 13px;
  font-weight: 850;
}

.locked-teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.locked-teaser-grid article {
  position: relative;
  min-height: 118px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(173, 100, 37, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.locked-teaser-grid article::after {
  content: "закрыто";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: #4b5563;
  font-size: 11px;
  font-weight: 950;
}

.locked-teaser-grid strong,
.locked-teaser-grid p {
  display: block;
  filter: blur(0.35px);
}

.locked-teaser-grid strong {
  margin-bottom: 7px;
  color: #111827;
}

.locked-teaser-grid p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.35;
}

.expanded-value-panel,
.premium-visual-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.98) 52%, rgba(20, 111, 72, 0.08)),
    #ffffff;
  box-shadow: var(--shadow);
}

.expanded-value-panel h3,
.expanded-value-panel p,
.premium-visual-section h3,
.premium-visual-section p {
  margin: 0;
}

.expanded-value-panel h3,
.premium-visual-section h3 {
  margin-bottom: 8px;
  font-size: 28px;
}

.expanded-value-list {
  display: grid;
  gap: 10px;
  align-content: center;
}

.expanded-value-list span {
  padding: 12px 14px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #374151;
  font-size: 14px;
  font-weight: 850;
}

.premium-visual-section {
  grid-template-columns: 1fr;
}

.premium-visual-controls {
  display: grid;
  gap: 16px;
}

.premium-visual-section .primary-button {
  width: fit-content;
}

.full-report-content {
  display: grid;
  gap: 18px;
}

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

.score-grid > .full-report-nav,
.score-grid > .full-report-section,
.score-grid > .expanded-value-panel,
.score-grid > .premium-visual-section,
.score-grid > .ai-prompt-section,
.score-grid > .top-bottom-facets,
.score-grid > .context-cards-section {
  grid-column: 1 / -1;
}

.full-report-nav {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.full-report-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.full-report-nav a:hover,
.full-report-nav a:focus-visible {
  background: #f3f4f6;
  color: #7c3aed;
}

.full-report-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.full-report-section h3,
.full-report-section p,
.full-report-section ul {
  margin: 0;
}

.full-report-section h3 {
  color: #111827;
  font-size: 26px;
  line-height: 1.15;
}

.full-report-section p,
.full-report-section li {
  color: var(--muted);
  line-height: 1.5;
}

.full-report-section ul {
  padding-left: 20px;
}

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

.cross-factor-grid article {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.cross-factor-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 18px;
}

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

.score-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  --score-color: var(--blue);
}

.score-card-high {
  --score-color: var(--green);
}

.score-card-low {
  --score-color: var(--amber);
}

.score-card-invalid {
  --score-color: var(--red);
}

.score-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.score-head h3,
.detail-section h3,
.legal-note h3 {
  margin: 0;
  font-size: 20px;
}

.score-percent {
  color: var(--blue);
  font-size: 24px;
  font-weight: 850;
}

.track {
  height: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.score-card .fill {
  background: var(--score-color);
}

.score-card p,
.legal-note p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.score-copy p {
  margin-bottom: 8px;
}

.score-copy .score-title {
  color: var(--ink);
  font-weight: 850;
}

.full-factor-copy {
  display: grid;
  gap: 10px;
}

.full-factor-copy div {
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f9fafb;
}

.full-factor-copy span {
  display: block;
  margin-bottom: 6px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.score-sections div,
.score-next {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.score-sections strong,
.score-next strong {
  display: block;
  margin-bottom: 6px;
}

.score-sections p {
  margin: 0;
}

.score-next ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.facet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.facet-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.facet-accordion summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  color: #111827;
  font-weight: 900;
  list-style: none;
}

.facet-accordion summary::-webkit-details-marker {
  display: none;
}

.facet-accordion summary span,
.facet-accordion summary strong {
  display: block;
}

.facet-accordion summary strong {
  color: #7c3aed;
  font-size: 14px;
  text-align: right;
}

.facet-accordion[open] summary {
  border-bottom: 1px solid #e5e7eb;
}

.facet-accordion .facet-list {
  padding: 14px;
}

.facet-group h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.facet {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.facet-highlight {
  border-color: rgba(124, 58, 237, 0.28);
  background:
    linear-gradient(180deg, rgba(124, 58, 237, 0.05), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.facet-topline {
  display: grid;
  gap: 8px;
}

.facet strong {
  display: block;
  margin-bottom: 6px;
}

.facet small {
  color: var(--muted);
}

.facet-copy p,
.facet-sections p {
  margin: 0;
}

.facet-title {
  color: var(--ink);
  font-weight: 750;
}

.highlight-badge {
  background: #eef2ff;
  color: #4338ca;
}

.facet-copy p + p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.facet-sections {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.facet-sections strong {
  color: var(--ink);
}

.facet-recommendations {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.facet-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.facet-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.admin-input {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.admin-settings {
  display: grid;
  gap: 14px;
}

.admin-settings label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-login-card::before,
.two-factor-panel::before {
  content: "";
  height: 4px;
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(90deg, var(--purple), var(--green));
}

.two-factor-panel {
  border-color: rgba(124, 58, 237, 0.24);
}

.totp-setup-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(32, 178, 120, 0.08));
}

.totp-secret-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.totp-secret-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.totp-secret-card strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.legacy-admin-token {
  align-self: start;
  padding: 14px;
  border: 1px dashed rgba(101, 112, 126, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
}

.legacy-admin-token summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.legacy-admin-token .consent-box {
  margin-top: 14px;
  box-shadow: none;
}

.admin-state-line {
  align-self: start;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(32, 178, 120, 0.18);
  border-radius: 8px;
  background: rgba(32, 178, 120, 0.07);
}

.admin-state-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

body[data-admin-authenticated="1"] .intro-panel > .admin-login-card,
body[data-admin-authenticated="1"] .intro-panel > .legacy-admin-token {
  display: none;
}

.admin-logout-link {
  margin-left: 8px;
  color: #4c1d95;
  font-weight: 700;
  text-decoration: underline;
}

.admin-logout-link:hover {
  color: #6d28d9;
}

.admin-state-hint code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.1);
  color: #4c1d95;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.backup-codes-panel {
  border-color: rgba(220, 38, 38, 0.32);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.55), rgba(254, 243, 199, 0.55));
}

.backup-codes-panel::before {
  content: "";
  height: 4px;
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(90deg, #dc2626, #f59e0b);
}

.backup-codes-list {
  list-style: none;
  margin: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
}

.backup-codes-list li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4c1d95;
}

@media (max-width: 520px) {
  .backup-codes-list {
    grid-template-columns: 1fr;
  }
}

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

.admin-textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.ai-test-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.ai-test-result p {
  margin: 0;
}

.ai-test-image {
  width: min(100%, 360px);
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fff9 100%);
  box-shadow: var(--shadow-soft);
}

.admin-stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.admin-stat-card strong {
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
}

.admin-stat-card small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-table {
  display: grid;
  gap: 12px;
}

.admin-session {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.admin-session-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-session-head strong,
.admin-session-head span {
  display: block;
}

.admin-session-head span {
  color: var(--muted);
}

.status-badge {
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink) !important;
  font-weight: 800;
  white-space: nowrap;
}

.mini-scores {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.mini-scores div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mini-scores span,
.mini-scores strong {
  display: block;
}

.mini-scores span {
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.mini-scores strong {
  color: var(--blue);
  font-size: 20px;
}

.admin-session-portrait {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-session-portrait-info {
  display: grid;
  gap: 5px;
}

.admin-session-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-portrait-thumb {
  width: min(220px, 100%);
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-portrait-link {
  width: min(220px, 100%);
  display: block;
  grid-column: 1 / -1;
}

.account-page {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.account-hero,
.account-auth-grid,
.account-dashboard,
.account-list {
  display: grid;
  gap: 18px;
}

.account-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
  align-items: stretch;
  margin-bottom: 22px;
}

.account-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  color: #111827;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  font-weight: 950;
}

.account-hero p {
  max-width: 780px;
  margin: 0;
  color: #6b7280;
  font-size: 19px;
  line-height: 1.58;
}

.account-status-card,
.account-card,
.account-session-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06);
}

.account-status-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
}

.account-status-card span,
.account-session-card span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-status-card strong {
  color: #111827;
  font-size: 26px;
  line-height: 1.1;
}

.account-auth-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
}

.account-card h2,
.account-session-card h4 {
  margin: 0;
  color: #111827;
  line-height: 1.12;
}

.account-card label,
.admin-bootstrap-details label {
  display: grid;
  gap: 7px;
}

.admin-bootstrap-details {
  color: #4b5563;
}

.admin-bootstrap-details summary {
  cursor: pointer;
  font-weight: 850;
}

.account-session-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.85fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.account-session-card p {
  margin: 8px 0 0;
  color: #4b5563;
  line-height: 1.45;
}

.account-mini-bars {
  display: grid;
  gap: 8px;
}

.account-mini-bars div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.account-mini-bars span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
}

.account-mini-bars i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f3;
}

.account-mini-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b5cf6 0%, #0ea5a9 54%, #22c55e 100%);
}

.account-mini-bars strong {
  color: #111827;
  font-size: 13px;
}

.account-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-state {
  margin-top: 18px;
}

/* Landwind-inspired product layout for SelfSonar. */
body {
  background: #ffffff;
  color: #111827;
}

.app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.topbar {
  top: 0;
  min-height: 68px;
  margin: 0;
  padding: 14px max(16px, calc((100vw - 1280px) / 2 + 24px));
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.brand-mark::before {
  background: url("/assets/brand/selfsonar-mark-3-1-orbit.png") center / contain no-repeat;
  box-shadow: none;
}

.brand-mark span {
  color: #111827;
}

.brand-mark small,
.topnav a {
  color: #4b5563;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: #f9fafb;
  color: #7c3aed;
}

.text-link {
  border-color: #e5e7eb;
  background: #ffffff;
  color: #111827;
}

.intro-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 60px;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.78fr);
  gap: 54px;
  align-items: start;
}

.intro-panel::before {
  display: none;
}

.eyebrow {
  color: #7c3aed;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hero-copy h1 {
  max-width: 780px;
  margin-bottom: 22px;
  color: #111827;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  font-weight: 950;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 28px;
  color: #6b7280;
  font-size: 21px;
  line-height: 1.62;
}

.hero-actions {
  gap: 14px;
  margin-bottom: 28px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  font-size: 15px;
}

.primary-button {
  background: #7c3aed;
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.22);
}

.primary-button:hover {
  background: #6d28d9;
  box-shadow: 0 18px 34px rgba(124, 58, 237, 0.24);
}

.secondary-button {
  border-color: #e5e7eb;
  background: #ffffff;
  color: #111827;
}

.secondary-button:hover {
  border-color: #c7d2fe;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.hero-metrics {
  max-width: 720px;
  gap: 14px;
  margin-bottom: 18px;
}

.hero-metrics div,
.method-note,
.factor-pill,
.consent-box,
.featured-card,
.test-card,
.platform-band article {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.hero-metrics div {
  min-height: 94px;
  padding: 18px;
}

.hero-metrics strong,
.featured-meta strong {
  color: #111827;
}

.hero-metrics span,
.method-note span,
.section-head p,
.featured-card p,
.test-card p,
.platform-band p {
  color: #6b7280;
}

.method-note {
  max-width: 720px;
  padding: 16px 18px;
}

.factor-strip {
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  max-width: 1040px;
  gap: 12px;
}

.factor-pill {
  min-height: 104px;
  border-left: 0;
  padding: 14px;
}

.factor-pill::after {
  background: linear-gradient(90deg, #7c3aed, #22c55e);
  opacity: 0.75;
}

.consent-box {
  padding: 22px;
  background: #ffffff;
}

.start-card::before {
  display: none;
}

.start-card::after {
  display: none;
}

.hero-preview {
  order: 20;
  padding: 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f9fafb;
}

.preview-window {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.result-preview-card {
  display: grid;
  gap: 14px;
}

.preview-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.preview-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d1d5db;
}

.preview-score {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.preview-score strong {
  color: #111827;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.05;
}

.preview-score span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 850;
}

.preview-label,
.preview-note {
  margin: 0;
}

.preview-label {
  color: #7c3aed;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-note {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

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

.preview-feature {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(34, 197, 94, 0.04));
}

.preview-feature span {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 950;
}

.preview-feature strong {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
}

.preview-feature small {
  min-width: 0;
  color: #6b7280;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.preview-lines,
.featured-preview {
  display: grid;
  gap: 10px;
}

.preview-lines span,
.featured-preview span {
  width: var(--w);
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #22c55e);
}

.start-card h2 {
  max-width: 100%;
  color: #111827;
}

.start-card-points span,
.test-card-meta span,
.tag-row span {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.platform-band {
  width: min(1280px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
  padding: 0 0 72px;
}

.platform-band article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.platform-band span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 950;
}

.platform-band strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 20px;
  line-height: 1.2;
}

.platform-band p {
  margin: 0;
  line-height: 1.55;
}

.catalog-section {
  margin: 0;
  padding: 72px max(16px, calc((100vw - 1280px) / 2 + 24px));
  background: #f9fafb;
}

.section-head {
  max-width: 1280px;
  margin: 0 auto 18px;
}

.section-head h2 {
  color: #111827;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 950;
}

.catalog-search input {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

.category-tabs,
.featured-test,
.test-catalog {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.category-tabs {
  gap: 10px;
  margin-bottom: 18px;
}

.category-tabs button {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

.category-tabs button.active {
  border-color: #7c3aed;
  background: #7c3aed;
}

.featured-card {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: 28px;
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.08);
}

.featured-card::before {
  display: none;
}

.featured-card h3 {
  color: #111827;
  font-weight: 950;
}

.featured-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.featured-preview {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.featured-meta div:not(.featured-preview) {
  border-color: #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

.test-catalog {
  gap: 16px;
}

.test-card {
  min-height: 324px;
  padding: 20px;
  border-color: #e5e7eb;
  background: #ffffff;
}

.test-card::before {
  display: none;
}

.test-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 20px 42px rgba(17, 24, 39, 0.08);
}

.test-card h3 {
  color: #111827;
  font-size: 23px;
}

.test-card-head {
  justify-content: flex-start;
  gap: 10px;
}

.test-card-head > span:not(.status-pill):not(.test-card-icon) {
  color: #6b7280;
}

.test-card-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 950;
}

.status-pill.available {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.soon {
  background: #f3f4f6;
  color: #6b7280;
}

.test-card.soon {
  cursor: default;
  border-color: #d1d5db;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
}

.test-card.soon:hover {
  transform: none;
  border-color: #d1d5db;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
}

.test-card.soon .test-card-icon {
  border: 1px solid #d1d5db;
  background: #eef0f3;
  color: #9ca3af;
}

.test-card.soon h3,
.test-card.soon p,
.test-card.soon .test-card-head > span:not(.status-pill):not(.test-card-icon),
.test-card.soon .test-card-meta span {
  color: #6b7280;
}

.test-card.soon .status-pill.soon {
  border: 1px solid #e5e7eb;
  background: #eef0f3;
  color: #6b7280;
}

.test-card.soon .secondary-button:disabled {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
}

.notice {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 18px;
  border-color: #fde68a;
  background: #fffbeb;
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 16px, 720px);
    padding: 10px 0 28px;
  }

  .topbar,
  .results-head,
  .intro-panel,
  .section-head,
  .featured-card,
  .test-view {
    display: block;
  }

  .results-head h2 {
    font-size: 31px;
    line-height: 1.14;
  }

  .topbar {
    position: static;
    padding: 10px;
  }

  .topnav {
    flex-wrap: wrap;
    margin-top: 10px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 0.98;
  }

  .intro-panel {
    padding-top: 24px;
  }

  .intro-panel::before {
    height: 760px;
  }

  .catalog-search {
    margin-top: 14px;
  }

  .featured-meta {
    margin-top: 14px;
  }

  .text-link,
  .actions {
    margin-top: 14px;
  }

  .results-head > div,
  .actions,
  .result-hero,
  .personality-map,
  .life-meaning,
  .full-report-content,
  .score-grid,
  .detail-section {
    min-width: 0;
    width: 100%;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions .primary-button,
  .actions .secondary-button {
    width: 100%;
  }

  .factor-strip,
  .hero-metrics,
  .test-catalog,
  .account-hero,
  .account-auth-grid,
  .account-session-card,
  .featured-meta,
  .field-grid,
  .settings-grid,
  .portrait-layout,
  .result-overview,
  .free-scale-grid,
  .insight-grid,
  .insight-list,
  .personal-profile-hero,
  .profile-formula,
  .profile-grid,
  .profile-insights,
  .profile-next,
  .test-seo-block,
  .comparison-highlights,
  .comparison-bars > div,
  .norm-compare-grid,
  .norm-compare-head,
  .locked-teaser-grid,
  .profile-standout,
  .cross-factor-grid,
  .share-card-grid,
  .score-sections,
  .summary-list,
  .score-grid,
  .facet-grid,
  .facet-list,
  .factor-card-grid,
  .life-grid,
  .mini-scores {
    grid-template-columns: 1fr;
  }

  .intro-panel,
  .test-view,
  .question-panel,
  .progress-panel {
    padding: 14px;
  }

  .test-sonar-visual {
    display: none;
  }

  .question-text {
    max-width: none;
  }

  .intro-panel {
    padding-inline: 0;
  }

  .start-card h2 {
    max-width: 100%;
  }

  .start-card::after {
    position: static;
    width: 100%;
    margin: -2px 0 2px;
  }

  .full-report-gate {
    display: grid;
    grid-template-columns: 1fr;
  }

  .expanded-value-panel,
  .premium-visual-section {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .expanded-value-panel h3,
  .premium-visual-section h3 {
    font-size: 24px;
  }

  .premium-visual-section .primary-button {
    width: 100%;
  }

  .share-head {
    display: grid;
  }

  .pair-invite-section {
    padding: 18px;
  }

  .observer-result-section {
    padding: 18px;
  }

  .observer-result-grid {
    grid-template-columns: 1fr;
  }

  .pair-invite-controls,
  .pair-invite-controls .primary-button,
  .observer-result-actions,
  .observer-result-actions .primary-button,
  .observer-result-actions .secondary-button,
  .pair-code-box,
  .pair-code-controls,
  .pair-code-box .secondary-button,
  .ai-copy-button {
    width: 100%;
  }

  .pair-code-controls {
    grid-template-columns: 1fr;
  }

  .full-report-gate .primary-button {
    position: static;
    width: 100%;
  }

  .consent-box,
  .progress-panel {
    margin-top: 14px;
  }

  .progress-panel {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
  }

  .progress-ring {
    width: 68px;
    height: 68px;
    border-width: 7px;
  }

  .progress-ring span {
    font-size: 24px;
  }

  .question-panel {
    margin-top: 14px;
  }

  .question-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
  }

  .question-text {
    min-height: 0;
    font-size: clamp(24px, 7vw, 32px);
  }

  .likert {
    grid-template-columns: 1fr;
  }

  .likert button {
    min-height: 52px;
    text-align: left;
  }

  .nav-row .primary-button,
  .nav-row .secondary-button {
    flex: 1;
    padding-inline: 10px;
  }

  .admin-session-head {
    display: grid;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .mini-scores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-session-portrait {
    grid-template-columns: 1fr;
  }

  .admin-session-actions {
    justify-content: stretch;
  }

  .admin-session-actions .secondary-button {
    width: 100%;
  }

  .app-shell {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .topbar {
    border-radius: 0;
  }

  .intro-panel {
    width: min(100% - 16px, 720px);
    padding: 92px 0 44px;
  }

  .platform-band {
    width: min(100% - 16px, 720px);
    grid-template-columns: 1fr;
    padding-bottom: 44px;
  }

  .catalog-section {
    padding: 44px 8px;
  }

  .featured-card,
  .test-card,
  .platform-band article {
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
  }

  .result-hero,
  .hero-conclusions,
  .personality-map-grid,
  .life-meaning-grid,
  .full-factor-grid {
    grid-template-columns: 1fr;
  }

  .result-hero {
    padding: 18px;
  }

  .result-hero h2 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .result-action-row {
    position: sticky;
    bottom: 10px;
    z-index: 8;
    display: grid;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.14);
  }

  .result-action-row .primary-button,
  .result-action-row .secondary-button {
    width: 100%;
  }

  .result-mini-formula,
  .share-mini-bars div {
    grid-template-columns: 1fr;
  }

  .hero-conclusions article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .factor-card-head,
  .facet-accordion summary {
    display: grid;
  }

  .radial-meter {
    width: 86px;
    height: 86px;
  }

  .full-report-nav {
    position: static;
  }

  .share-profile-card {
    min-height: 0;
  }

  .results-view.has-personal-result .results-head {
    display: none;
  }

  .mobile-result-actions:not(.hidden) {
    position: sticky;
    bottom: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -16px 34px rgba(17, 24, 39, 0.14);
  }

  .mobile-result-actions .primary-button,
  .mobile-result-actions .secondary-button {
    min-height: 46px;
    padding-inline: 8px;
    font-size: 13px;
  }

  .result-hero-copy h2 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .result-hero-copy > p:not(.eyebrow) {
    font-size: 17px;
  }

  .key-insights,
  .personality-map,
  .life-meaning,
  .share-card-section {
    padding: 18px;
  }

  .preview-mini-bars div,
  .mini-factor-bar,
  .share-mini-bars div {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .preview-mini-bars i,
  .mini-factor-bar i,
  .share-mini-bars i {
    grid-column: 1 / -1;
  }
}

@media print {
  .topbar,
  .notice,
  .actions {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .score-grid,
  .facet-grid,
  .facet-list,
  .summary-list {
    grid-template-columns: 1fr;
  }
}

/* === Observer feature ("How others see you") === */

.observer-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.observer-report-summary > div {
  background: #fbfcfa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.observer-report-summary strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.observer-report-summary p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.45;
}

.observer-report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}

.observer-report-table th,
.observer-report-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef0ec;
}

.observer-report-table thead th {
  background: #f5f6f2;
  font-weight: 600;
  font-size: 13px;
  color: #555;
}

.observer-report-table tbody th {
  font-weight: 600;
}

.observer-list li {
  display: inline;
}

.observer-list li:not(:last-child)::after {
  content: " · ";
  color: #999;
}

@media (max-width: 720px) {
  .legal-page {
    width: min(100% - 20px, 1120px);
    padding: 16px 0 36px;
  }

  .legal-hero {
    padding: 22px;
  }

  .legal-hero p:last-child {
    font-size: 16px;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }

  .legal-block {
    padding: 18px;
  }

  .legal-links a {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 20px, 1120px);
    margin-top: 0;
    padding: 18px 0 24px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .observer-report-summary {
    grid-template-columns: 1fr;
  }

  .observer-report-table {
    font-size: 13px;
  }

  .observer-report-table th,
  .observer-report-table td {
    padding: 8px 6px;
  }
}

/* === Danger zone & destructive controls === */

.eyebrow.danger {
  color: #b91c1c;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ghost-button:hover:not(:disabled),
.ghost-button:focus-visible:not(:disabled) {
  background: rgba(15, 23, 42, 0.05);
}

.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost-button.danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: #b91c1c;
}

.ghost-button.danger:hover:not(:disabled),
.ghost-button.danger:focus-visible:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  color: #991b1b;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.danger-button:hover:not(:disabled),
.danger-button:focus-visible:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
}

.danger-button:disabled {
  background: rgba(220, 38, 38, 0.4);
  border-color: rgba(220, 38, 38, 0.4);
  cursor: not-allowed;
}

.danger-zone {
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 12px;
  padding: 22px 24px;
  background: rgba(220, 38, 38, 0.04);
}

.danger-zone .section-head {
  margin-bottom: 16px;
}

.danger-zone-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.danger-zone-form label > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.danger-zone-form .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
}

.admin-session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* === Pre-purchase example page (big-five-example.html) === */

.preview-expand-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.example-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.95), rgba(20, 184, 166, 0.95));
  color: #ffffff;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 8px rgba(17, 24, 39, 0.18);
}

/* CSS `display: flex` выше перебивает HTML-атрибут `hidden`, поэтому форсируем
   скрытие явно. Баннер появляется только когда JS убирает атрибут hidden. */
.example-banner[hidden] {
  display: none !important;
}

.example-banner strong {
  font-weight: 700;
  margin-right: 4px;
}

.example-banner a {
  color: #ffffff;
  text-decoration: underline;
  white-space: nowrap;
}

.example-banner-text {
  flex: 1 1 auto;
}

body[data-page="big-five-example"] .results-view button:not([data-allow-in-example]),
body[data-page="big-five-example"] .results-view input,
body[data-page="big-five-example"] .results-view select,
body[data-page="big-five-example"] .results-view textarea,
body[data-example="1"] .results-view button:not([data-allow-in-example]),
body[data-example="1"] .results-view input,
body[data-example="1"] .results-view select,
body[data-example="1"] .results-view textarea {
  pointer-events: none;
  opacity: 0.75;
}

body[data-page="big-five-example"] .results-view .primary-button[disabled],
body[data-page="big-five-example"] .results-view .secondary-button[disabled],
body[data-example="1"] .results-view .primary-button,
body[data-example="1"] .results-view .secondary-button {
  cursor: not-allowed;
}

body[data-example="1"] .results-view .actions a {
  pointer-events: none;
  opacity: 0.7;
}

/* Observer marketing perks strip */
.observer-result-perks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 22px;
}

.observer-result-perks > div {
  padding: 14px 16px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.04), rgba(34, 197, 94, 0.04));
}

.observer-result-perks strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #4c1d95;
  margin-bottom: 4px;
}

.observer-result-perks span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

.observer-result-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* AI analysis hero block */
.ai-analysis-section {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(34, 197, 94, 0.04) 60%, #ffffff 100%);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  padding: clamp(22px, 3vw, 36px) !important;
}

.ai-analysis-intro {
  margin-bottom: 24px;
}

.ai-analysis-intro h3 {
  margin: 6px 0 14px;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1.15;
  color: #111827;
  max-width: 820px;
}

.ai-analysis-lead {
  margin: 0 0 22px;
  max-width: 820px;
  font-size: 16px;
  line-height: 1.62;
  color: #1f2937;
}

.ai-analysis-perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ai-analysis-perks > div {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.05);
}

.ai-analysis-perks strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #6d28d9;
  margin-bottom: 4px;
}

.ai-analysis-perks span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
}

.ai-analysis-note {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

.ai-analysis-quote {
  margin: 0;
  padding: 24px 28px;
  border-left: 4px solid #7c3aed;
  background: #ffffff;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.ai-analysis-quote p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.68;
  color: #1f2937;
}

.ai-analysis-quote p:last-of-type {
  margin-bottom: 14px;
}

.ai-analysis-quote strong {
  color: #6d28d9;
  font-weight: 800;
}

.ai-analysis-quote footer {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

@media (max-width: 720px) {
  .observer-result-perks,
  .ai-analysis-perks {
    grid-template-columns: 1fr;
  }
  .ai-analysis-quote {
    padding: 18px 18px;
  }
}

/* === Save-your-result CTA (anonymous users only) === */

.save-result-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid #fde68a;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(249, 115, 22, 0.06) 70%, #fffbeb 100%);
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.08);
}

.save-result-copy .eyebrow {
  color: #b45309;
}

.save-result-copy h3 {
  margin: 6px 0 14px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
}

.save-result-perks {
  margin: 0 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.save-result-perks li {
  font-size: 14px;
  line-height: 1.55;
  color: #1f2937;
}

.save-result-perks strong {
  color: #b45309;
  font-weight: 800;
}

.save-result-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
  font-style: italic;
}

.save-result-actions {
  display: grid;
  gap: 10px;
  align-self: center;
}

.save-result-actions .primary-button,
.save-result-actions .secondary-button {
  width: 100%;
  text-align: center;
}

.save-result-actions .primary-button {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

.save-result-actions .primary-button:hover,
.save-result-actions .primary-button:focus-visible {
  background: #b45309;
  border-color: #b45309;
}

@media (max-width: 720px) {
  .save-result-cta {
    grid-template-columns: 1fr;
  }
}


/* === Feature blocks (Pair + Observer) === */

.feature-block {
  border-radius: 14px;
  padding: clamp(20px, 3vw, 32px) !important;
}

/* Глобальный `.section-head` использует 2-колоночный grid (1fr / 340px),
   из-за чего eyebrow, h3 и параграфы внутри feature-block разбегались по колонкам.
   В feature-блоках мы хотим линейный поток сверху вниз. */
.feature-block .section-head {
  display: block;
  grid-template-columns: none;
  margin-bottom: 18px;
}

.pair-create-form {
  margin: 18px 0 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(14, 165, 233, 0.22);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.05);
}

.pair-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.pair-create-row label > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0369a1;
}

.pair-create-form .muted {
  margin: 10px 0 0;
}

@media (max-width: 720px) {
  .pair-create-row {
    grid-template-columns: 1fr;
  }
}

.feature-pair {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(124, 58, 237, 0.04) 60%, #ffffff 100%);
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.feature-observer {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(124, 58, 237, 0.04) 60%, #ffffff 100%);
  border: 1px solid rgba(20, 184, 166, 0.22);
}

.feature-block .section-head h3 {
  margin: 6px 0 12px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
}

.feature-lead {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.62;
  color: #1f2937;
  max-width: 880px;
}

.feature-lead strong {
  color: #111827;
  font-weight: 800;
}

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

.feature-observer .feature-perks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-perks > div {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.feature-perks strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}

.feature-pair .feature-perks strong {
  color: #0369a1;
}

.feature-observer .feature-perks strong {
  color: #0f766e;
}

.feature-perks span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

.feature-how-to {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
}

.feature-how-to strong {
  color: #0f172a;
  font-weight: 800;
}

.feature-how-to em {
  font-style: italic;
  color: #6d28d9;
  font-weight: 700;
}

.feature-distinction {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid rgba(245, 158, 11, 0.5);
  font-size: 13px;
  line-height: 1.55;
  color: #78350f;
}

.feature-distinction strong {
  color: #92400e;
}

.feature-list-title {
  margin: 22px 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #374151;
  text-transform: none;
  letter-spacing: 0;
}

@media (max-width: 720px) {
  .feature-perks {
    grid-template-columns: 1fr !important;
  }
}


/* === Validity warning banner === */

.validity-banner {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 22px;
  margin: 0 0 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(249, 115, 22, 0.08) 70%, #fffbeb 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-left: 4px solid #d97706;
}

.validity-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.validity-banner-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: #78350f;
  font-weight: 800;
}

.validity-banner-body p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #1f2937;
}

.validity-banner-body ul {
  margin: 6px 0 8px 0;
  padding-left: 22px;
}

.validity-banner-body li {
  font-size: 13px;
  line-height: 1.5;
  color: #1f2937;
}

.validity-banner-cta {
  font-size: 13px;
  color: #4b5563;
}

.validity-banner-cta a {
  color: #b45309;
  font-weight: 700;
  text-decoration: underline;
}

/* === Hero pattern (под архетипом) === */

.profile-pattern {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.18);
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
}

.profile-pattern .pattern-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
}

.profile-pattern .pattern-label {
  font-weight: 700;
  color: #4c1d95;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-pattern strong {
  font-weight: 700;
  color: #111827;
}

.profile-pattern em {
  font-style: italic;
  font-size: 12px;
  color: #6b7280;
}

.pattern-confidence {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13px;
  color: #374151;
  margin-top: 4px;
}

.pattern-confidence .confidence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(1px);
}

.pattern-confidence[data-level="strong"] .confidence-dot {
  background: #16a34a;
}

.pattern-confidence[data-level="moderate"] .confidence-dot {
  background: #d97706;
}

.pattern-confidence[data-level="weak"] .confidence-dot {
  background: #94a3b8;
}

.pattern-confidence .confidence-label {
  font-weight: 700;
  color: #111827;
}

.pattern-confidence .confidence-note {
  color: #4b5563;
  font-size: 13px;
}

/* Визуально понизить архетипный заголовок при weak-сигнале —
   профиль ровный, не должно быть гигантского h2 во весь экран. */
.result-hero[data-confidence="weak"] #profileArchetypeTitle {
  font-size: clamp(32px, 4vw, 48px);
}

.result-hero[data-confidence="moderate"] #profileArchetypeTitle {
  font-size: clamp(38px, 5vw, 64px);
}

/* === Facet teaser в бесплатной части === */

.facet-teaser {
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.06), rgba(124, 58, 237, 0.04) 70%, #ffffff 100%);
  border: 1px solid rgba(20, 184, 166, 0.22);
  margin-bottom: 24px;
}

.facet-teaser-head h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.facet-teaser-head .eyebrow {
  color: #0f766e;
}

.facet-teaser-head p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}

.facet-teaser-contrast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 12px 0;
}

.facet-teaser-card {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: grid;
  gap: 6px;
}

.facet-teaser-card.top {
  border-left: 4px solid #0f766e;
}

.facet-teaser-card.low {
  border-left: 4px solid #b45309;
}

.facet-teaser-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #6b7280;
}

.facet-teaser-card strong {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}

.facet-teaser-score {
  font-size: 24px;
  font-weight: 900;
  color: #0f766e;
}

.facet-teaser-card.low .facet-teaser-score {
  color: #b45309;
}

.facet-teaser-divider {
  font-size: 22px;
  color: #94a3b8;
  text-align: center;
}

.facet-teaser-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  margin: 12px 0;
}

.facet-teaser-single strong {
  font-size: 17px;
  font-weight: 800;
}

.facet-teaser-single p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

.facet-teaser-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* === Top / Bottom facets в полном отчёте === */

.top-bottom-facets {
  padding: 24px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  margin: 0 0 24px;
}

.top-bottom-facets .section-head h3 {
  margin: 4px 0 6px;
  font-size: 22px;
}

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

.top-bottom-column h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.facet-rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.facet-rank-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.facet-rank {
  font-size: 14px;
  font-weight: 800;
  color: #6d28d9;
  text-align: center;
}

.facet-rank-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.facet-rank-meta {
  font-size: 12px;
  color: #6b7280;
}

.facet-rank-body p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #4b5563;
}

.facet-rank-score {
  font-size: 18px;
  font-weight: 900;
  color: #111827;
  align-self: center;
}

.facet-rank-score[data-band="high"] {
  color: #0f766e;
}

.facet-rank-score[data-band="low"] {
  color: #b91c1c;
}

@media (max-width: 720px) {
  .top-bottom-grid {
    grid-template-columns: 1fr;
  }

  .facet-teaser-contrast {
    grid-template-columns: 1fr;
  }

  .facet-teaser-divider {
    transform: rotate(90deg);
  }

  .validity-banner {
    grid-template-columns: 1fr;
  }

  .pattern-confidence {
    flex-direction: column;
    gap: 4px;
  }
}

/* === Accordion expand hint === */
.facet-accordion summary::after {
  content: "▾";
  display: inline-block;
  margin-left: 12px;
  color: #7c3aed;
  font-size: 16px;
  transition: transform 0.2s ease;
  font-weight: 900;
}

.facet-accordion[open] summary::after {
  transform: rotate(180deg);
}

.facet-accordion summary:hover {
  background: rgba(124, 58, 237, 0.04);
}

/* === Facet teaser v2: 3 facets + big CTA === */

.facet-teaser-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.facet-teaser-three .facet-teaser-card {
  border-left: 4px solid #7c3aed;
}

.facet-teaser-three .facet-teaser-card.is-top {
  border-left-color: #0f766e;
}

.facet-teaser-three .facet-teaser-card.is-low {
  border-left-color: #b45309;
}

.facet-teaser-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-top: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #0f766e 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.25);
  flex-wrap: wrap;
}

.facet-teaser-cta-text {
  flex: 1 1 auto;
  min-width: 220px;
}

.facet-teaser-cta-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.facet-teaser-cta-text span {
  display: block;
  font-size: 14px;
  opacity: 0.92;
}

.facet-teaser-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  background: #ffffff;
  color: #4c1d95;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.facet-teaser-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

@media (max-width: 720px) {
  .facet-teaser-three {
    grid-template-columns: 1fr;
  }
  .facet-teaser-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .facet-teaser-cta-button {
    width: 100%;
    justify-content: center;
  }
}

/* === Observer block (account + result) — right column layout === */

.observer-result-section.observer-stacked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.observer-result-section.observer-stacked .share-head {
  display: block;
}

.observer-result-section.observer-stacked .observer-result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.observer-result-section.observer-stacked .observer-result-cta {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .observer-result-section.observer-stacked {
    grid-template-columns: 1fr;
  }
}

/* === Full-report gate v2 — больше деталей и AI === */

.gate-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.gate-features article {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.18);
  display: grid;
  gap: 6px;
}

.gate-features article strong {
  font-size: 14px;
  font-weight: 800;
  color: #4c1d95;
}

.gate-features article p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
}

.gate-features article span.feature-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  width: fit-content;
}

.gate-features article.is-ai span.feature-tag {
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
}

@media (max-width: 720px) {
  .gate-features {
    grid-template-columns: 1fr;
  }
}

/* === Context cards (Работа / Общение / Риски) — row of cards === */

.context-cards-section {
  padding: 24px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.context-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.context-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-top: 4px solid #7c3aed;
}

.context-card.context-work {
  border-top-color: #0369a1;
}

.context-card.context-communication {
  border-top-color: #0f766e;
}

.context-card.context-risks {
  border-top-color: #b45309;
}

.context-card .eyebrow {
  margin: 0;
  font-size: 11px;
}

.context-card h4 {
  margin: 4px 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.context-card p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.context-card ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #4b5563;
}

.context-card li {
  margin-bottom: 4px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .context-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* === AI deep analysis block (v2 — без share-head, с явной иерархией) === */

.ai-deep-block {
  padding: clamp(24px, 3vw, 36px) !important;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(34, 197, 94, 0.05) 60%, #ffffff 100%) !important;
  border: 1px solid rgba(124, 58, 237, 0.22) !important;
  border-radius: 16px !important;
}

.ai-deep-head {
  margin-bottom: 22px;
}

.ai-deep-eyebrow {
  color: #6d28d9;
  margin-bottom: 6px;
}

.ai-deep-head h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  line-height: 1.2;
  color: #111827;
  max-width: 820px;
}

.ai-deep-lead {
  margin: 0;
  max-width: 820px;
  font-size: 15px;
  line-height: 1.62;
  color: #1f2937;
}

.ai-deep-perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.ai-deep-perks > div {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.05);
}

.ai-deep-perks strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #6d28d9;
  margin-bottom: 4px;
}

.ai-deep-perks span {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: #4b5563;
}

.ai-deep-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ai-deep-cta .primary-button {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.ai-deep-cta .ai-analysis-status {
  flex: 1 1 280px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.ai-deep-block .prompt-privacy-note {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #4b5563;
  margin: 0;
}

.ai-deep-block .prompt-privacy-note a {
  color: #6d28d9;
  font-weight: 700;
}

.ai-deep-block .ai-analysis-result {
  margin-top: 22px;
}

@media (max-width: 720px) {
  .ai-deep-perks {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .ai-deep-perks {
    grid-template-columns: 1fr;
  }
}

/* === Landing features showcase === */

.landing-features {
  grid-column: 1 / -1;
  margin: 32px 0 0;
  padding: 36px 0 0;
  border-top: 1px solid #e5e7eb;
}

.landing-features-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.landing-features-head h2 {
  margin: 6px 0 12px;
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 950;
  line-height: 1.1;
  color: #111827;
}

.landing-features-head p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-feature {
  position: relative;
  padding: 22px 22px 24px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.landing-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border-color: rgba(124, 58, 237, 0.32);
}

.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(20, 184, 166, 0.12));
  font-size: 22px;
  margin-bottom: 12px;
}

.landing-feature strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}

.landing-feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.landing-feature-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #0f766e);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.landing-feature-ai {
  border-color: rgba(124, 58, 237, 0.32);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), #ffffff 60%);
}

.landing-feature-ai .landing-feature-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(20, 184, 166, 0.16));
}

@media (max-width: 960px) {
  .landing-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .landing-features-grid {
    grid-template-columns: 1fr;
  }
}

/* === Section CTAs on landing (duplicated after each big block) === */

.section-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding: 22px 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(20, 184, 166, 0.05) 70%, #ffffff);
  border: 1px solid rgba(124, 58, 237, 0.18);
}

.section-cta .primary-button {
  padding: 12px 22px;
  font-size: 15px;
  white-space: nowrap;
}

.section-cta-note {
  flex: 1 1 220px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.section-cta-wide {
  justify-content: space-between;
}

@media (max-width: 540px) {
  .section-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .section-cta .primary-button {
    width: 100%;
  }
}

/* === Info icon (tooltip) === */

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: help;
  position: relative;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.info-icon:hover,
.info-icon:focus-visible {
  background: rgba(124, 58, 237, 0.22);
  outline: none;
}

.info-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 300px;
  padding: 14px 16px;
  background: #faf5ff;
  /* !important нужен, потому что .info-tooltip часто живёт внутри родителя
     с собственным цветом (например, .pair-code-box span { color: #4b5563 }). */
  color: #1f2937 !important;
  font-size: 13px !important;
  font-style: normal;
  font-family: inherit;
  font-weight: 400 !important;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.55;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.32);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.18), 0 4px 8px rgba(15, 23, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

.info-tooltip * {
  color: inherit !important;
  font-weight: inherit;
}

.info-tooltip strong {
  color: #6d28d9 !important;
  font-weight: 700 !important;
}

.info-tooltip::before,
.info-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border: 7px solid transparent;
}

/* Внешний треугольник = граница (фиолетовая обводка стрелки) */
.info-tooltip::before {
  top: 100%;
  border-top-color: rgba(124, 58, 237, 0.32);
}

/* Внутренний треугольник = заливка под фон tooltip-а */
.info-tooltip::after {
  top: calc(100% - 1px);
  border-top-color: #faf5ff;
  border-width: 6px;
}

/* старый duplicate-блок ниже — оставлен пустым после переноса выше */

.info-icon:hover .info-tooltip,
.info-icon:focus-visible .info-tooltip,
.info-icon:active .info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 720px) {
  .info-tooltip {
    width: 240px;
  }
}

/* === Home aside (правый блок главной страницы) === */

.home-aside {
  display: grid;
  gap: 18px;
  align-content: start;
}

.home-aside-features {
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(20, 184, 166, 0.05) 70%, #ffffff);
  border: 1px solid rgba(124, 58, 237, 0.22);
}

.home-aside-features .eyebrow {
  margin: 0 0 6px;
  color: #6d28d9;
}

.home-aside-features h3 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 900;
  color: #111827;
  line-height: 1.25;
}

.home-aside-lead {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 13.5px;
  line-height: 1.6;
}

.home-aside-feature-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.home-aside-feature-list li {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(124, 58, 237, 0.16);
}

.home-aside-feature-list li:last-child {
  border-bottom: 0;
}

.home-aside-feature-list strong {
  display: block;
  color: #4c1d95;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}

.home-aside-feature-list span {
  display: block;
  color: #374151;
  font-size: 13px;
  line-height: 1.55;
}

.home-aside-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #6d28d9;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.home-aside-cta:hover {
  background: #4c1d95;
  transform: translateY(-1px);
}


/* ============================================
   HOMEPAGE REDESIGN 2026-07-03
   Hero + Benefits + Steps + Trust + Observer
   ============================================ */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: start;
  margin-top: 24px;
  padding: 44px 44px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fbfaff 0%, #ffffff 60%);
  border: 1px solid rgba(124, 58, 237, 0.08);
}

.home-hero-copy {
  display: grid;
  gap: 20px;
  align-content: start;
  padding-top: 8px;
}

.home-hero-copy > .eyebrow {
  margin: 0;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-hero-copy h1 {
  margin: 0;
  max-width: 620px;
  color: #0f172a;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.home-hero-subtitle {
  margin: 0;
  max-width: 560px;
  color: #5b6475;
  font-size: 17px;
  line-height: 1.6;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.home-hero-chips {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.home-hero-chips li img {
  display: block;
  width: 22px;
  height: 22px;
}

.home-hero-chips .chip-numeral {
  color: #7c3aed;
  font-weight: 900;
}

.home-hero-hidden-metrics {
  display: none !important;
}

/* Hero preview mockup card */
.home-hero-preview {
  display: flex;
  align-items: stretch;
}

.preview-card {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
  box-shadow: 0 28px 52px rgba(15, 23, 42, 0.08);
}

.preview-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.preview-card-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.preview-card-title {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.preview-card-status {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #5b6475;
  font-size: 11px;
  font-weight: 700;
}

.preview-card-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.preview-radar {
  display: flex;
  justify-content: center;
}

.preview-radar svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.preview-bars {
  display: grid;
  gap: 10px;
}

.preview-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.preview-bar-row > span:first-child {
  color: #5b6475;
  font-weight: 500;
}

.preview-bar-row strong {
  text-align: right;
  color: #0f172a;
  font-weight: 800;
}

.preview-bar {
  height: 6px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
}

.preview-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  border-radius: 999px;
}

.preview-card-ai {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.preview-card-ai img {
  display: block;
  flex-shrink: 0;
}

.preview-card-ai strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 2px;
  font-weight: 800;
}

.preview-card-ai span {
  color: #5b6475;
  font-size: 13px;
  line-height: 1.4;
}

.preview-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-card-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e7e9f2;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

/* === Common section head === */

.home-section-head {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin-bottom: 28px;
}

.home-section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.home-section-head .eyebrow {
  margin: 0;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.home-section-head > p {
  margin: 0;
  color: #5b6475;
  font-size: 16px;
  line-height: 1.55;
  max-width: 640px;
}

/* === Benefits === */

.home-benefits {
  margin-top: 36px;
  padding: 44px 40px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
}

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

.benefit-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 18px;
  background: #fafbff;
  border: 1px solid #e7e9f2;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.benefit-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit-card-icon img {
  width: 44px;
  height: 44px;
  display: block;
}

.benefit-card strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.benefit-card p {
  margin: 0;
  color: #5b6475;
  font-size: 14px;
  line-height: 1.55;
}

.benefit-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.benefit-card-wide .benefit-card-icon {
  width: 72px;
  height: 72px;
}

.benefit-card-wide .benefit-card-icon img {
  width: 52px;
  height: 52px;
}

.benefit-card-copy {
  display: grid;
  gap: 6px;
}

.benefit-disclaimer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  color: #5b6475;
  font-size: 13px;
  line-height: 1.5;
}

.benefit-disclaimer img {
  flex-shrink: 0;
  display: block;
}

/* === Steps === */

.home-steps {
  margin-top: 28px;
  padding: 44px 40px;
  border-radius: 24px;
  background: #fafbff;
  border: 1px solid #e7e9f2;
}

.steps-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  display: grid;
  gap: 12px;
  padding: 26px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  font-weight: 900;
  font-size: 18px;
}

.step-card strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.step-card p {
  margin: 0;
  color: #5b6475;
  font-size: 14px;
  line-height: 1.55;
}

/* === Trust === */

.home-trust {
  margin-top: 28px;
  padding: 44px 40px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e7e9f2;
}

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

.trust-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 16px;
  background: #fafbff;
  border: 1px solid #e7e9f2;
}

.trust-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-card-icon svg {
  width: 22px;
  height: 22px;
}

.trust-card strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.trust-card p {
  margin: 0;
  color: #5b6475;
  font-size: 13px;
  line-height: 1.5;
}

/* === Observer === */

.home-observer {
  margin-top: 28px;
  padding: 44px 44px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.06), transparent 55%),
    linear-gradient(120deg, rgba(20, 111, 72, 0.04), transparent 60%),
    #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.14);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 32px;
  align-items: center;
}

.home-observer-copy {
  display: grid;
  gap: 16px;
}

.home-observer-copy .observer-eyebrow {
  margin: 0 0 4px;
}

.home-observer-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.home-observer-copy > p {
  margin: 0;
  max-width: 480px;
  color: #5b6475;
  font-size: 16px;
  line-height: 1.55;
}

.home-observer-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.observer-preview-card {
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: 0 28px 52px rgba(25, 44, 36, 0.08);
  display: grid;
  gap: 12px;
}

.observer-preview-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.observer-preview-lead {
  margin: 0;
  color: #5b6475;
  font-size: 14px;
  line-height: 1.5;
}

.observer-preview-link {
  color: #7c3aed;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  align-self: start;
}

.observer-preview-link:hover {
  text-decoration: underline;
}

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

.observer-insight-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e7e9f2;
  border-radius: 14px;
  background: rgba(250, 251, 255, 0.92);
}

.observer-insight-item img {
  display: block;
  width: 34px;
  height: 34px;
}

.observer-insight-item strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.observer-insight-item span {
  display: block;
  margin-top: 2px;
  color: #5b6475;
  font-size: 12px;
  line-height: 1.35;
}

.observer-preview-bars {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 16px;
  border-radius: 14px;
  background: #fafbff;
  border: 1px solid #e7e9f2;
}

.observer-preview-legend {
  display: flex;
  gap: 16px;
  color: #5b6475;
  font-size: 12px;
  font-weight: 600;
}

.observer-preview-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.observer-preview-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.observer-preview-legend .dot-self {
  background: #7c3aed;
}

.observer-preview-legend .dot-others {
  background: #14b8a6;
}

.observer-preview-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #5b6475;
  font-weight: 600;
}

.observer-preview-bar-pair {
  display: grid;
  gap: 4px;
}

.observer-preview-bar {
  height: 6px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
}

.observer-preview-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.observer-preview-fill.fill-self {
  background: #7c3aed;
}

.observer-preview-fill.fill-others {
  background: #14b8a6;
}

/* === Responsive === */

@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }
  .preview-card-body {
    grid-template-columns: 1fr;
  }
  .preview-radar {
    max-width: 260px;
    margin: 0 auto;
  }
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-observer {
    grid-template-columns: 1fr;
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .home-hero {
    padding: 24px;
  }
  .home-benefits,
  .home-steps,
  .home-trust,
  .home-observer {
    padding: 24px;
  }
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .benefit-card-wide {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .observer-preview-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

/* ============================================
   HOMEPAGE REFERENCE POLISH 2026-07-03
   Matches the compact report-dashboard visual.
   ============================================ */

body[data-page="home"] {
  background:
    radial-gradient(circle at 9% 24%, rgba(124, 58, 237, 0.08), transparent 25%),
    linear-gradient(180deg, #ffffff 0, #fbfcff 48%, #f8fbff 100%);
  color: #0f172a;
}

body[data-page="home"] .app-shell {
  width: min(1680px, calc(100% - 32px));
  padding: 0 0 48px;
}

body[data-page="home"] .topbar {
  top: 0;
  min-height: 78px;
  margin: 0 0 18px;
  padding: 12px 32px;
  border-color: #dde5f3;
  border-radius: 0 0 10px 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

body[data-page="home"] .brand-mark {
  grid-template-columns: 56px minmax(0, 1fr);
}

body[data-page="home"] .brand-mark span {
  font-size: 25px;
}

body[data-page="home"] .brand-mark small {
  font-size: 12px;
}

body[data-page="home"] main {
  overflow: hidden;
  border: 1px solid #e1e7f2;
  border-radius: 10px;
  background:
    linear-gradient(120deg, rgba(124, 58, 237, 0.05), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.92));
}

body[data-page="home"] .home-hero {
  position: relative;
  grid-template-columns: minmax(500px, 0.96fr) minmax(520px, 1.04fr);
  gap: 34px;
  margin: 0;
  padding: 34px 40px 22px;
  border: 0;
  border-bottom: 1px solid #e1e7f2;
  border-radius: 0;
  background:
    linear-gradient(120deg, rgba(124, 58, 237, 0.045), transparent 45%),
    transparent;
}

body[data-page="home"] .home-hero-copy {
  gap: 18px;
  padding-top: 8px;
}

body[data-page="home"] .home-hero-copy > .eyebrow {
  color: #7c3aed;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="home"] .home-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 950;
}

body[data-page="home"] .home-hero-subtitle {
  max-width: 690px;
  color: #536176;
  font-size: 17px;
  line-height: 1.48;
}

body[data-page="home"] .home-hero-actions {
  gap: 10px;
  margin-top: 4px;
}

body[data-page="home"] .home-hero-actions .primary-button,
body[data-page="home"] .home-hero-actions .secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

body[data-page="home"] .home-hero-actions .primary-button::after {
  content: "→";
  margin-left: 10px;
}

body[data-page="home"] .home-hero-actions .secondary-button::after {
  content: "▣";
  margin-left: 10px;
  color: #7c3aed;
  font-size: 14px;
}

body[data-page="home"] .home-hero-chips {
  gap: 10px;
  margin-top: 8px;
}

body[data-page="home"] .home-hero-chips li {
  min-height: 42px;
  padding: 9px 14px;
  border-color: #e1e7f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #4d5c73;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

body[data-page="home"] .home-hero #factorStrip {
  display: none !important;
}

body[data-page="home"] .home-hero-preview {
  min-width: 0;
}

body[data-page="home"] .preview-card {
  gap: 12px;
  padding: 18px 20px;
  border-color: #dfe6f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 54px rgba(39, 31, 87, 0.08);
}

body[data-page="home"] .preview-card-head {
  align-items: center;
}

body[data-page="home"] .preview-card-label {
  position: relative;
  margin: 0;
  padding: 0 0 0 30px;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="home"] .preview-card-label::before {
  content: "✧";
  position: absolute;
  left: 0;
  top: -2px;
  color: #7c3aed;
  font-size: 24px;
  line-height: 1;
}

body[data-page="home"] .preview-card-title {
  display: none;
}

body[data-page="home"] .preview-card-status {
  padding: 7px 14px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  font-size: 12px;
  font-weight: 850;
}

body[data-page="home"] .preview-card-body {
  grid-template-columns: minmax(250px, 0.95fr) minmax(280px, 1.05fr);
  gap: 24px;
  align-items: center;
}

body[data-page="home"] .preview-radar svg {
  max-width: 270px;
}

body[data-page="home"] .preview-bars {
  gap: 10px;
}

body[data-page="home"] .preview-bars .preview-bar-row:nth-child(3),
body[data-page="home"] .preview-bars .preview-bar-row:nth-child(4) {
  display: none;
}

body[data-page="home"] .preview-bar-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 13px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

body[data-page="home"] .preview-bar-row > span:first-child {
  color: #111827;
  font-weight: 850;
}

body[data-page="home"] .preview-bar-row strong {
  color: #111827;
  font-weight: 900;
}

body[data-page="home"] .preview-bar-row strong::after {
  content: " / 100";
  color: #7a8497;
  font-size: 12px;
  font-weight: 750;
}

body[data-page="home"] .preview-bar {
  grid-column: 1 / -1;
  height: 5px;
  background: #e8edf5;
}

body[data-page="home"] .preview-bar > span {
  background: linear-gradient(90deg, #6d28d9, #7c3aed);
}

body[data-page="home"] .preview-card-ai {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-color: #e1e7f2;
  border-radius: 8px;
  background: #ffffff;
}

body[data-page="home"] .preview-card-ai img {
  width: 38px;
  height: 38px;
}

body[data-page="home"] .preview-ai-link {
  color: #7c3aed;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

body[data-page="home"] .preview-ai-link:hover {
  text-decoration: underline;
}

body[data-page="home"] .preview-card-tags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="home"] .preview-card-tags span {
  min-height: 66px;
  display: grid;
  align-content: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

body[data-page="home"] .home-benefits,
body[data-page="home"] .home-steps,
body[data-page="home"] .home-trust,
body[data-page="home"] .home-observer {
  margin: 0;
  padding: 18px 40px;
  border: 0;
  border-bottom: 1px solid #e1e7f2;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.66);
}

body[data-page="home"] .home-benefits,
body[data-page="home"] .home-steps,
body[data-page="home"] .home-trust {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

body[data-page="home"] .home-section-head {
  gap: 8px;
  max-width: none;
  margin: 0;
  text-align: left;
}

body[data-page="home"] .home-section-head .eyebrow {
  color: #111827;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="home"] .home-section-head h2 {
  color: #111827;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

body[data-page="home"] .home-benefits .home-section-head h2 {
  display: none;
}

body[data-page="home"] .home-section-head > p {
  color: #536176;
  font-size: 14px;
  line-height: 1.42;
}

body[data-page="home"] .benefits-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="home"] .benefit-card {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
  min-height: 82px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

body[data-page="home"] .benefit-card-icon {
  grid-row: 1 / 3;
  width: 58px;
  height: 58px;
  border: 0;
  background: transparent;
}

body[data-page="home"] .benefit-card-icon img {
  width: 58px;
  height: 58px;
}

body[data-page="home"] .benefit-card strong {
  font-size: 15px;
  line-height: 1.2;
}

body[data-page="home"] .benefit-card p {
  font-size: 12px;
  line-height: 1.35;
}

body[data-page="home"] .benefit-card-wide {
  grid-column: 1 / -1;
  grid-template-columns: 68px minmax(0, 1fr);
}

body[data-page="home"] .benefit-card-wide .benefit-card-icon,
body[data-page="home"] .benefit-card-wide .benefit-card-icon img {
  width: 58px;
  height: 58px;
}

body[data-page="home"] .benefit-disclaimer {
  grid-column: 2;
  margin: 8px 0 0;
  padding: 12px 16px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-page="home"] .steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
}

body[data-page="home"] .step-card {
  position: relative;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 16px;
  min-height: 74px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #ffffff;
}

body[data-page="home"] .step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -30px;
  top: 50%;
  color: #64748b;
  font-size: 24px;
  font-weight: 800;
  transform: translateY(-50%);
}

body[data-page="home"] .step-num {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #ffffff;
  font-size: 14px;
}

body[data-page="home"] .step-card strong {
  font-size: 14px;
}

body[data-page="home"] .step-card p {
  font-size: 12px;
  line-height: 1.34;
}

body[data-page="home"] .trust-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="home"] .trust-card {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 6px 14px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #ffffff;
}

body[data-page="home"] .trust-card-icon {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.08);
}

body[data-page="home"] .trust-card strong {
  font-size: 14px;
}

body[data-page="home"] .trust-card p {
  font-size: 12px;
  line-height: 1.35;
}

body[data-page="home"] .home-observer {
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border-bottom: 0;
}

body[data-page="home"] .home-observer-copy h2 {
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: 0;
}

body[data-page="home"] .observer-preview-card {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px 24px;
  padding: 18px 22px;
  border-radius: 10px;
  box-shadow: 0 20px 44px rgba(39, 31, 87, 0.07);
}

body[data-page="home"] .observer-card-label,
body[data-page="home"] .observer-preview-card h3,
body[data-page="home"] .observer-preview-lead,
body[data-page="home"] .observer-preview-link {
  grid-column: 1;
}

body[data-page="home"] .observer-insight-list,
body[data-page="home"] .observer-preview-bars {
  grid-column: 2;
}

body[data-page="home"] .observer-insight-list {
  grid-row: 1 / 5;
}

body[data-page="home"] .observer-insight-item {
  min-height: 58px;
  border-radius: 8px;
}

@media (max-width: 1320px) {
  body[data-page="home"] .benefits-grid,
  body[data-page="home"] .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  body[data-page="home"] .home-hero {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .preview-card-body {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 980px) {
  body[data-page="home"] .app-shell {
    width: min(100% - 20px, 900px);
  }

  body[data-page="home"] .topbar {
    padding: 10px 16px;
  }

  body[data-page="home"] .home-hero,
  body[data-page="home"] .home-benefits,
  body[data-page="home"] .home-steps,
  body[data-page="home"] .home-trust,
  body[data-page="home"] .home-observer {
    padding: 26px 24px;
  }

  body[data-page="home"] .home-benefits,
  body[data-page="home"] .home-steps,
  body[data-page="home"] .home-trust,
  body[data-page="home"] .home-observer {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .benefit-disclaimer {
    grid-column: auto;
  }

  body[data-page="home"] .steps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body[data-page="home"] .step-card:not(:last-child)::after {
    display: none;
  }

  body[data-page="home"] .observer-preview-card {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .observer-card-label,
  body[data-page="home"] .observer-preview-card h3,
  body[data-page="home"] .observer-preview-lead,
  body[data-page="home"] .observer-preview-link,
  body[data-page="home"] .observer-insight-list,
  body[data-page="home"] .observer-preview-bars {
    grid-column: auto;
  }

  body[data-page="home"] .observer-insight-list {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  body[data-page="home"] .home-hero-copy h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  body[data-page="home"] .preview-radar {
    display: none;
  }

  body[data-page="home"] .preview-card {
    padding: 16px;
  }

  body[data-page="home"] .preview-card-body,
  body[data-page="home"] .preview-card-ai {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .preview-card-ai {
    display: none;
  }

  body[data-page="home"] .benefits-grid,
  body[data-page="home"] .trust-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .preview-card-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="home"] .benefit-card,
  body[data-page="home"] .benefit-card-wide,
  body[data-page="home"] .trust-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}
