/* ============================================================
   اكتشف ذاتك V2 — product shell, homepage and trust surfaces
   ============================================================ */

:root {
  --v2-ink: #171329;
  --v2-muted: #655f78;
  --v2-paper: #fbfaf7;
  --v2-surface: #ffffff;
  --v2-line: rgba(28, 22, 49, 0.11);
  --v2-violet: #6847d9;
  --v2-violet-deep: #42249f;
  --v2-coral: #f06f52;
  --v2-gold: #e5a72c;
  --v2-mint: #147f70;
  --v2-shadow: 0 24px 70px rgba(50, 34, 96, 0.12);
  --v2-shadow-soft: 0 12px 34px rgba(50, 34, 96, 0.08);
  --v2-radius: 28px;
}

[data-theme="dark"] {
  --v2-ink: #f8f5ff;
  --v2-muted: #b9b1cd;
  --v2-paper: #100d1d;
  --v2-surface: #19152a;
  --v2-line: rgba(255, 255, 255, 0.1);
  --v2-violet: #987cf7;
  --v2-violet-deep: #c4b5ff;
  --v2-coral: #ff8b6f;
  --v2-gold: #f4bf51;
  --v2-mint: #54c7b6;
  --v2-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --v2-shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.22);
}

html {
  scroll-padding-top: 94px;
}

body {
  overflow-x: clip;
}

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

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--v2-violet) 72%, white);
  outline-offset: 3px;
}

/* ---------- Compact global header ---------- */

#site-header.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  height: auto;
  background: color-mix(in srgb, var(--v2-paper) 88%, transparent);
  border-block-end: 1px solid transparent;
  color: var(--v2-ink);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#site-header.site-header.is-scrolled {
  border-color: var(--v2-line);
  box-shadow: 0 8px 30px rgba(37, 24, 76, 0.07);
}

#site-header .header-inner {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  min-height: 76px;
  gap: clamp(18px, 3vw, 44px);
}

#site-header .brand,
.site-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--v2-ink);
}

#site-header .brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--v2-muted);
  font-size: 0.67rem;
}

#site-header .main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 4px;
  flex-wrap: nowrap;
}

#site-header .nav-link {
  position: relative;
  padding: 10px 11px;
  border-radius: 12px;
  color: var(--v2-muted);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

#site-header .nav-link:hover,
#site-header .nav-link.is-active {
  background: color-mix(in srgb, var(--v2-violet) 9%, transparent);
  color: var(--v2-violet-deep);
}

#site-header .header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.header-start {
  padding: 10px 15px;
  border-radius: 13px;
  background: var(--v2-ink);
  color: var(--v2-paper);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.header-start:hover {
  background: var(--v2-violet);
  color: #fff;
  transform: translateY(-1px);
}

#site-header .lang-btn,
#site-header .icon-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  font-size: 0.8rem;
  font-weight: 800;
}

#site-header .icon-btn:hover,
#site-header .lang-btn:hover {
  border-color: color-mix(in srgb, var(--v2-violet) 38%, transparent);
  color: var(--v2-violet);
}

#site-header .nav-toggle {
  display: none;
}

.mobile-nav-panel {
  display: none;
}

/* ---------- Homepage ---------- */

.home-v2 {
  background: var(--v2-paper);
  color: var(--v2-ink);
}

.home-v2 main {
  overflow: clip;
}

.home-v2 section {
  padding-block: clamp(72px, 9vw, 124px);
}

.v2-hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: center;
  padding-block: clamp(76px, 8vw, 118px) !important;
  isolation: isolate;
  background:
    radial-gradient(circle at 9% 16%, rgba(229, 167, 44, 0.16), transparent 23rem),
    radial-gradient(circle at 92% 24%, rgba(104, 71, 217, 0.16), transparent 27rem),
    var(--v2-paper);
}

.v2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(var(--v2-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--v2-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.v2-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  align-items: center;
  gap: clamp(48px, 7vw, 100px);
}

.v2-kicker,
.section-kicker,
.footer-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--v2-violet-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.v2-kicker {
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--v2-violet) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-surface) 76%, transparent);
}

.v2-kicker::before,
.section-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v2-coral);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--v2-coral) 14%, transparent);
}

.v2-hero h1 {
  max-width: 770px;
  margin: 25px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 1.1;
  letter-spacing: -0.055em;
  color: var(--v2-ink);
}

.v2-hero h1 span {
  color: var(--v2-violet);
}

.v2-hero-lead {
  max-width: 660px;
  color: var(--v2-muted);
  font-size: clamp(1.04rem, 1.7vw, 1.23rem);
  line-height: 1.95;
}

.v2-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.home-v2 .btn {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 15px;
  font-size: 0.91rem;
}

.home-v2 .btn-primary {
  background: var(--v2-violet);
  border-color: var(--v2-violet);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--v2-violet) 27%, transparent);
}

.home-v2 .btn-primary:hover {
  background: var(--v2-violet-deep);
  border-color: var(--v2-violet-deep);
}

.btn-quiet {
  border: 1px solid var(--v2-line);
  background: var(--v2-surface);
  color: var(--v2-ink);
}

.btn-quiet:hover {
  border-color: var(--v2-violet);
  color: var(--v2-violet-deep);
}

.hero-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: var(--v2-muted);
  font-size: 0.78rem;
}

.hero-assurances span::before {
  content: "✓";
  margin-inline-end: 6px;
  color: var(--v2-mint);
  font-weight: 900;
}

.hero-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.hero-stage::before,
.hero-stage::after {
  content: "";
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--v2-violet) 20%, transparent);
  border-radius: 50%;
}

.hero-stage::before {
  width: 440px;
  height: 440px;
}

.hero-stage::after {
  width: 320px;
  height: 320px;
  border-style: dashed;
  animation: v2-spin 28s linear infinite;
}

.profile-preview {
  position: relative;
  z-index: 2;
  width: min(390px, 100%);
  padding: 27px;
  border: 1px solid color-mix(in srgb, var(--v2-violet) 18%, var(--v2-line));
  border-radius: 32px;
  background: color-mix(in srgb, var(--v2-surface) 92%, transparent);
  box-shadow: var(--v2-shadow);
  backdrop-filter: blur(14px);
  transform: rotate(-2deg);
}

[dir="rtl"] .profile-preview {
  transform: rotate(2deg);
}

.profile-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--v2-line);
}

.profile-preview-head div {
  display: grid;
}

.profile-preview-head span,
.profile-axis small,
.profile-insight small {
  color: var(--v2-muted);
  font-size: 0.72rem;
}

.profile-preview-head strong {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.profile-badge {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--v2-violet), var(--v2-coral));
  color: #fff;
  font-weight: 900;
}

.profile-axes {
  display: grid;
  gap: 15px;
  margin-block: 24px;
}

.profile-axis div {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--v2-violet) 9%, var(--v2-line));
}

.profile-axis div::after {
  content: "";
  display: block;
  width: var(--axis);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--v2-violet), var(--v2-coral));
}

.profile-insight {
  padding: 16px 17px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--v2-violet) 8%, var(--v2-surface));
}

.profile-insight strong {
  display: block;
  margin-top: 5px;
  font-size: 0.88rem;
  line-height: 1.7;
}

.orbit-note {
  position: absolute;
  z-index: 3;
  padding: 10px 13px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-soft);
  color: var(--v2-ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.orbit-note.one {
  inset: 13% auto auto 2%;
}

.orbit-note.two {
  inset: auto 4% 13% auto;
}

.hero-metrics {
  position: relative;
  z-index: 5;
  margin-top: -32px;
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 22px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-soft);
}

.hero-metric {
  padding: 21px 24px;
  border-inline-start: 1px solid var(--v2-line);
}

.hero-metric:first-child {
  border: 0;
}

.hero-metric strong {
  display: block;
  color: var(--v2-ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.hero-metric span {
  display: block;
  margin-top: 5px;
  color: var(--v2-muted);
  font-size: 0.76rem;
}

/* ---------- Section system ---------- */

.soft-section {
  background: color-mix(in srgb, var(--v2-violet) 4.5%, var(--v2-paper));
  border-block: 1px solid var(--v2-line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 38px;
}

.section-heading.center {
  display: block;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 42px;
  text-align: center;
}

.section-heading.center .section-kicker {
  justify-content: center;
}

.section-heading h2,
.trust-copy h2,
.knowledge-intro h2,
.closing-card h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--v2-ink);
}

.section-heading > p {
  max-width: 480px;
  color: var(--v2-muted);
  line-height: 1.85;
}

/* ---------- Guided matcher ---------- */

.matcher-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 18px;
}

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

.match-goal {
  position: relative;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--v2-line);
  border-radius: 22px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  text-align: start;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.match-goal:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--v2-violet) 45%, var(--v2-line));
  box-shadow: var(--v2-shadow-soft);
}

.match-goal.is-selected {
  border-color: var(--v2-violet);
  background: color-mix(in srgb, var(--v2-violet) 6%, var(--v2-surface));
  box-shadow: inset 0 0 0 1px var(--v2-violet);
}

.match-goal b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--goal-color) 12%, transparent);
  color: var(--goal-color);
  font-size: 0.78rem;
}

.match-goal strong {
  display: block;
  margin-top: 21px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.match-goal small {
  display: block;
  margin-top: 7px;
  color: var(--v2-muted);
  line-height: 1.55;
}

.match-result {
  position: relative;
  min-height: 324px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border-radius: var(--v2-radius);
  background:
    radial-gradient(circle at 10% 10%, rgba(240, 111, 82, 0.25), transparent 36%),
    #21183f;
  color: #fff;
}

.match-result::after {
  content: "↗";
  position: absolute;
  inset: auto auto -56px -24px;
  color: rgba(255, 255, 255, 0.06);
  font-size: 15rem;
  font-weight: 900;
}

.match-result.is-updating > * {
  animation: v2-rise 0.38s ease both;
}

.match-result > span {
  color: #d1c3ff;
  font-size: 0.77rem;
  font-weight: 800;
}

.match-result h3 {
  max-width: 430px;
  margin: 13px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.45;
  color: #fff;
}

.match-result p {
  max-width: 490px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.85;
}

.match-result-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 25px;
}

.match-result .text-link {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Test library ---------- */

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-bottom: 28px;
}

.library-search {
  position: relative;
}

.library-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 48px 0 17px;
  border: 1px solid var(--v2-line);
  border-radius: 15px;
  background: var(--v2-surface);
  color: var(--v2-ink);
}

[dir="ltr"] .library-search input {
  padding: 0 17px 0 48px;
}

.library-search::before {
  content: "⌕";
  position: absolute;
  inset-inline-start: 17px;
  top: 50%;
  z-index: 2;
  color: var(--v2-muted);
  font-size: 1.3rem;
  transform: translateY(-50%);
}

.library-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.library-filter {
  min-height: 41px;
  padding: 0 14px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-surface);
  color: var(--v2-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.library-filter:hover,
.library-filter.is-active {
  border-color: var(--v2-ink);
  background: var(--v2-ink);
  color: var(--v2-paper);
}

.test-library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.v2-test-card {
  position: relative;
  min-width: 0;
  min-height: 244px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 22px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.v2-test-card[hidden] {
  display: none;
}

.v2-test-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--card-color, var(--v2-violet));
  transform: scaleX(0.22);
  transform-origin: right;
  transition: transform 0.28s ease;
}

.v2-test-card:hover {
  z-index: 1;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--card-color, var(--v2-violet)) 40%, var(--v2-line));
  box-shadow: var(--v2-shadow-soft);
  color: var(--v2-ink);
}

.v2-test-card:hover::before {
  transform: scaleX(1);
}

.test-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.test-code {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding-inline: 8px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--card-color, var(--v2-violet)) 11%, transparent);
  color: var(--card-color, var(--v2-violet));
  font-size: 0.71rem;
  font-weight: 900;
}

.test-time {
  color: var(--v2-muted);
  font-size: 0.7rem;
}

.v2-test-card h3 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.55;
}

.v2-test-card p {
  color: var(--v2-muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.test-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--card-color, var(--v2-violet));
  font-size: 0.75rem;
  font-weight: 800;
}

.test-card-foot i {
  font-style: normal;
  transition: transform 0.2s ease;
}

.v2-test-card:hover .test-card-foot i {
  transform: translateX(-4px);
}

.tests-empty {
  margin-top: 24px;
  padding: 22px;
  border: 1px dashed var(--v2-line);
  border-radius: 18px;
  color: var(--v2-muted);
  text-align: center;
}

/* ---------- Trust and knowledge ---------- */

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
}

.trust-copy p,
.knowledge-intro p {
  margin-top: 20px;
  color: var(--v2-muted);
  line-height: 1.95;
}

.trust-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 27px;
}

.trust-links a,
.knowledge-link {
  color: var(--v2-violet-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.trust-pillars {
  display: grid;
  gap: 11px;
}

.trust-pillar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 17px;
  padding: 21px;
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  background: var(--v2-surface);
}

.trust-pillar > b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--pillar-color) 11%, transparent);
  color: var(--pillar-color);
  font-size: 0.76rem;
}

.trust-pillar strong {
  display: block;
  color: var(--v2-ink);
  font-family: var(--font-display);
  font-size: 0.93rem;
}

.trust-pillar p {
  margin-top: 7px;
  color: var(--v2-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(36px, 6vw, 80px);
}

.knowledge-stack {
  display: grid;
  gap: 12px;
}

.knowledge-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 19px;
  padding: 19px;
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.knowledge-card:hover {
  transform: translateX(-4px);
  border-color: color-mix(in srgb, var(--v2-violet) 38%, var(--v2-line));
  color: var(--v2-ink);
}

.knowledge-card > span {
  display: grid;
  height: 62px;
  place-items: center;
  border-radius: 17px;
  background: color-mix(in srgb, var(--knowledge-color) 10%, transparent);
  color: var(--knowledge-color);
  font-size: 0.75rem;
  font-weight: 900;
}

.knowledge-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.knowledge-card small {
  display: block;
  margin-top: 6px;
  color: var(--v2-muted);
  line-height: 1.6;
}

.knowledge-card i {
  color: var(--v2-violet);
  font-style: normal;
  font-size: 1.2rem;
}

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

.journal-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--v2-line);
  border-radius: 24px;
  background: var(--v2-surface);
  color: var(--v2-ink);
}

.journal-card:hover {
  color: var(--v2-ink);
  box-shadow: var(--v2-shadow-soft);
  transform: translateY(-4px);
}

.journal-card > span {
  color: var(--article-color);
  font-size: 0.74rem;
  font-weight: 900;
}

.journal-card h3 {
  margin: 34px 0 12px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.65;
}

.journal-card p {
  color: var(--v2-muted);
  font-size: 0.84rem;
  line-height: 1.75;
}

.journal-card b {
  margin-top: auto;
  padding-top: 28px;
  color: var(--article-color);
  font-size: 0.78rem;
}

.closing-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 44px;
  padding: clamp(34px, 6vw, 70px);
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 30%, rgba(240, 111, 82, 0.3), transparent 35%),
    #21183f;
  color: #fff;
}

.closing-card h2 {
  max-width: 740px;
  margin-top: 0;
  color: #fff;
}

.closing-card p {
  max-width: 660px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.closing-card .btn {
  background: #fff;
  border-color: #fff;
  color: #21183f;
}

/* ---------- Global inner-page refinement ---------- */

body:not(.home-v2) {
  background: var(--v2-paper);
  color: var(--v2-ink);
}

body:not(.home-v2) .page-hero {
  background:
    radial-gradient(circle at 82% 15%, rgba(104, 71, 217, 0.12), transparent 30rem),
    var(--v2-paper);
}

body:not(.home-v2) .quiz-intro,
body:not(.home-v2) .quiz-shell,
body:not(.home-v2) .result-hero,
body:not(.home-v2) .prose,
body:not(.home-v2) .form-card {
  color: var(--v2-ink);
}

body:not(.home-v2) .prose {
  max-width: 840px;
  font-size: 1rem;
  line-height: 2;
}

body:not(.home-v2) .prose h2,
body:not(.home-v2) .prose h3 {
  color: var(--v2-ink);
}

/* ---------- Policy and methodology pages ---------- */

.policy-v2 {
  background: var(--v2-paper);
  color: var(--v2-ink);
}

.policy-hero {
  padding-block: clamp(58px, 8vw, 104px);
  border-bottom: 1px solid var(--v2-line);
  background:
    radial-gradient(circle at 84% 20%, rgba(104, 71, 217, 0.14), transparent 30rem),
    radial-gradient(circle at 12% 78%, rgba(229, 167, 44, 0.1), transparent 24rem);
}

.policy-hero-inner {
  max-width: 920px;
}

.policy-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--v2-muted);
  font-size: 0.73rem;
}

.policy-breadcrumb a {
  color: var(--v2-violet-deep);
}

.policy-hero h1 {
  margin: 22px 0 17px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1.25;
  letter-spacing: -0.045em;
  color: var(--v2-ink);
}

.policy-hero p {
  max-width: 760px;
  color: var(--v2-muted);
  font-size: 1.03rem;
  line-height: 1.9;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 24px;
  color: var(--v2-muted);
  font-size: 0.72rem;
}

.policy-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  justify-content: center;
  align-items: start;
  gap: clamp(40px, 7vw, 90px);
  padding-block: clamp(54px, 8vw, 100px);
}

.policy-nav {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--v2-line);
  border-radius: 18px;
  background: var(--v2-surface);
}

.policy-nav strong {
  padding: 6px 9px 11px;
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.policy-nav a {
  padding: 9px;
  border-radius: 10px;
  color: var(--v2-muted);
  font-size: 0.75rem;
}

.policy-nav a:hover {
  background: color-mix(in srgb, var(--v2-violet) 7%, transparent);
  color: var(--v2-violet-deep);
}

.policy-content {
  min-width: 0;
  font-size: 1rem;
  line-height: 2;
}

.policy-content > :first-child {
  margin-top: 0;
}

.policy-content h2 {
  scroll-margin-top: 110px;
  margin: 54px 0 13px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.55;
  color: var(--v2-ink);
}

.policy-content h3 {
  margin: 30px 0 8px;
  color: var(--v2-ink);
  font-size: 1.04rem;
}

.policy-content p,
.policy-content li {
  color: var(--v2-muted);
}

.policy-content ul,
.policy-content ol {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-inline-start: 23px;
}

.policy-content a {
  color: var(--v2-violet-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--v2-violet) 30%, transparent);
  text-underline-offset: 4px;
}

.policy-note {
  margin-block: 26px;
  padding: 21px 23px;
  border: 1px solid color-mix(in srgb, var(--note-color, var(--v2-violet)) 30%, var(--v2-line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--note-color, var(--v2-violet)) 6%, var(--v2-surface));
}

.policy-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--v2-ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.reference-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.reference-list li {
  padding: 14px 16px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: var(--v2-surface);
  font-size: 0.84rem;
}

.method-table-wrap {
  margin-block: 24px;
  overflow-x: auto;
  border: 1px solid var(--v2-line);
  border-radius: 18px;
}

.method-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--v2-surface);
}

.method-table th,
.method-table td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--v2-line);
  text-align: start;
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.7;
}

.method-table th {
  background: color-mix(in srgb, var(--v2-violet) 6%, var(--v2-surface));
  color: var(--v2-ink);
  font-family: var(--font-display);
}

.method-table tr:last-child td {
  border-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(70px, 9vw, 120px);
  background: #151126;
  color: #fff;
}

.footer-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 42px;
  padding-block: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-kicker {
  color: #bcaaff;
}

.footer-lead h2 {
  max-width: 790px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.3vw, 2.7rem);
  line-height: 1.5;
  color: #fff;
}

.btn-light {
  border-color: #fff;
  background: #fff;
  color: #18132c;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 42px;
  padding-block: 55px 43px;
}

.site-footer .brand {
  color: #fff;
}

.site-footer .brand-copy small,
.site-footer .footer-brand p {
  color: #a9a0be;
}

.site-footer .footer-brand p {
  max-width: 380px;
  margin-top: 18px;
  line-height: 1.85;
}

.footer-version {
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #bcaaff;
  font-size: 0.7rem;
  font-weight: 800;
}

.site-footer .footer-col h3 {
  margin-bottom: 18px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.site-footer .footer-col a,
.footer-link-button {
  display: block;
  width: fit-content;
  margin-block: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a9a0be;
  font-size: 0.8rem;
  text-align: start;
  cursor: pointer;
}

.site-footer .footer-col a:hover,
.footer-link-button:hover {
  color: #fff;
}

.site-footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #827992;
  font-size: 0.72rem;
  text-align: start;
}

/* ---------- Consent ---------- */

.consent-panel {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 1000;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 17px;
  width: min(960px, calc(100% - 40px));
  margin-inline: auto;
  padding: 18px;
  border: 1px solid var(--v2-line);
  border-radius: 21px;
  background: color-mix(in srgb, var(--v2-surface) 96%, transparent);
  box-shadow: 0 26px 80px rgba(20, 13, 42, 0.24);
  color: var(--v2-ink);
  backdrop-filter: blur(18px);
}

.consent-panel[hidden] {
  display: none;
}

.consent-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--v2-violet) 12%, transparent);
  color: var(--v2-violet);
  font-size: 1.4rem;
}

.consent-copy strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.consent-copy p {
  margin-top: 4px;
  color: var(--v2-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.consent-copy a {
  display: inline-block;
  margin-top: 3px;
  color: var(--v2-violet-deep);
  font-size: 0.7rem;
  font-weight: 700;
}

.consent-actions {
  display: flex;
  gap: 8px;
}

.consent-actions .btn {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 0.74rem;
}

.consent-actions .btn-ghost {
  border: 1px solid var(--v2-line);
  background: transparent;
  color: var(--v2-ink);
}

/* ---------- Motion ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.58s ease, transform 0.58s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes v2-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes v2-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1160px) {
  #site-header .main-nav {
    gap: 0;
  }

  #site-header .nav-link {
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .test-library-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1080px) {
  #site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  #site-header .main-nav,
  .header-start {
    display: none;
  }

  #site-header .nav-toggle {
    display: inline-grid;
  }

  #site-header .burger,
  #site-header .burger::before,
  #site-header .burger::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  #site-header .burger {
    position: relative;
  }

  #site-header .burger::before,
  #site-header .burger::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
  }

  #site-header .burger::before {
    top: -6px;
  }

  #site-header .burger::after {
    top: 6px;
  }

  .mobile-nav-panel {
    position: fixed;
    inset: 77px 12px auto;
    z-index: 99;
    display: grid;
    max-height: calc(100dvh - 93px);
    gap: 4px;
    padding: 18px;
    overflow: auto;
    border: 1px solid var(--v2-line);
    border-radius: 22px;
    background: var(--v2-surface);
    box-shadow: var(--v2-shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.22s ease;
  }

  .mobile-nav-panel.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-head {
    display: grid;
    padding: 5px 8px 15px;
    border-bottom: 1px solid var(--v2-line);
    margin-bottom: 6px;
  }

  .mobile-nav-head strong {
    color: var(--v2-ink);
    font-family: var(--font-display);
  }

  .mobile-nav-head span {
    margin-top: 5px;
    color: var(--v2-muted);
    font-size: 0.74rem;
  }

  .mobile-nav-panel .nav-link {
    padding: 13px 12px;
    border-radius: 12px;
    color: var(--v2-ink);
    font-weight: 700;
  }

  .mobile-nav-panel .nav-link:hover,
  .mobile-nav-panel .nav-link.is-active {
    background: color-mix(in srgb, var(--v2-violet) 8%, transparent);
    color: var(--v2-violet-deep);
  }

  .mobile-nav-cta {
    margin-top: 7px;
  }

  .nav-locked {
    overflow: hidden;
  }

  .v2-hero-grid,
  .trust-grid {
    grid-template-columns: 1fr 0.82fr;
    gap: 36px;
  }

  .hero-stage {
    min-height: 450px;
  }

  .profile-preview {
    width: 340px;
  }

  .hero-stage::before {
    width: 390px;
    height: 390px;
  }

  .hero-stage::after {
    width: 280px;
    height: 280px;
  }

  .matcher-shell {
    grid-template-columns: 1fr;
  }

  .match-result {
    min-height: 290px;
  }
}

@media (max-width: 860px) {
  .v2-hero {
    min-height: auto;
  }

  .v2-hero-grid,
  .trust-grid,
  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 410px;
  }

  .hero-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-metric:nth-child(3) {
    border-inline-start: 0;
  }

  .hero-metric:nth-child(n + 3) {
    border-top: 1px solid var(--v2-line);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .library-filter {
    flex: 0 0 auto;
  }

  .test-library-grid {
    grid-template-columns: 1fr 1fr;
  }

  .journal-grid {
    grid-template-columns: 1fr;
  }

  .journal-card {
    min-height: 240px;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-nav {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .policy-nav strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  #site-header .header-inner {
    min-height: 70px;
  }

  #site-header .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy small {
    display: none;
  }

  #site-header .header-actions {
    gap: 5px;
  }

  #site-header .lang-btn,
  #site-header .icon-btn {
    width: 38px;
    height: 38px;
  }

  .mobile-nav-panel {
    inset-block-start: 71px;
  }

  .home-v2 section {
    padding-block: 72px;
  }

  .v2-hero {
    padding-block: 54px 70px !important;
  }

  .v2-hero h1 {
    margin-top: 20px;
    font-size: clamp(2.55rem, 13.2vw, 4rem);
    letter-spacing: -0.05em;
  }

  .v2-hero-lead {
    font-size: 1rem;
    line-height: 1.85;
  }

  .v2-hero-actions .btn {
    width: 100%;
  }

  .hero-assurances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .hero-stage {
    min-height: 350px;
    margin-top: 6px;
  }

  .profile-preview {
    width: min(310px, calc(100vw - 68px));
    padding: 22px;
    transform: rotate(1deg);
  }

  .hero-stage::before {
    width: 330px;
    height: 330px;
  }

  .hero-stage::after {
    width: 245px;
    height: 245px;
  }

  .orbit-note.one {
    inset: 3% auto auto 0;
  }

  .orbit-note.two {
    inset: auto 0 1% auto;
  }

  .hero-metrics {
    margin-top: -2px;
  }

  .hero-metric {
    padding: 17px;
  }

  .matcher-options {
    grid-template-columns: 1fr;
  }

  .match-goal {
    min-height: 128px;
  }

  .match-goal strong {
    margin-top: 15px;
  }

  .test-library-grid {
    grid-template-columns: 1fr;
  }

  .v2-test-card {
    min-height: 210px;
  }

  .knowledge-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .knowledge-card > span {
    height: 54px;
  }

  .knowledge-card i {
    display: none;
  }

  .closing-card {
    grid-template-columns: 1fr;
  }

  .footer-lead,
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-lead > div,
  .footer-lead .btn,
  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer-bottom {
    display: grid;
    justify-content: start;
  }

  .consent-panel {
    inset: auto 10px 10px;
    grid-template-columns: 38px minmax(0, 1fr);
    width: calc(100% - 20px);
    padding: 15px;
  }

  .consent-mark {
    width: 38px;
    height: 38px;
  }

  .consent-actions {
    grid-column: 1 / -1;
  }

  .consent-actions .btn {
    flex: 1;
  }

  .policy-nav {
    grid-template-columns: 1fr;
  }

  .policy-nav strong {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage::after,
  .match-result.is-updating > * {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
