/* ==========================================================================
   psyche_mikani — main stylesheet
   RTL, mobile-first. All colours are tokens on :root; dark mode redefines them.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vazirmatn-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/vazirmatn-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vazirmatn-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-naskh-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/noto-naskh-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* ---------- Tokens ---------- */
:root {
  --sand:      #EAE1CF;  /* page background        */
  --paper:     #F5F0E5;  /* alternate section bg   */
  --card:      #FBF8F1;  /* card surfaces          */
  --ink:       #2C241B;  /* primary text           */
  --ink-soft:  #5F5140;  /* secondary text         */
  --moss:      #6E7455;  /* accent (decorative)    */
  --moss-deep: #565B41;  /* buttons, dark sections */
  --line:      #D6C9B0;  /* borders                */

  /* derived roles */
  --accent-text: #4F5439;           /* moss that passes AA as text on sand/paper */
  --btn-bg:      var(--moss-deep);
  --btn-bg-hover:#474B35;
  --btn-ink:     #FBF8F1;
  --dark-bg:     var(--moss-deep);  /* dark section background */
  --dark-ink:    #F5F0E5;
  --dark-soft:   #DCD6C3;
  --dark-line:   rgba(245, 240, 229, .22);
  --footer-bg:   #2C241B;
  --footer-ink:  #EAE1CF;
  --footer-soft: #BFB29C;
  --header-bg:   rgba(234, 225, 207, .82);
  --track:       #E6DCC7;
  --focus:       #2F5E8C;
  --masc:        #9A4C1B;           /* test pole: مردانگی (warm orange) */
  --masc-soft:   #F5E6D9;
  --fem:         #1F6C66;           /* test pole: زنانگی (teal) */
  --fem-soft:    #DEEDE9;
  --shadow:      0 1px 2px rgba(44, 36, 27, .06), 0 8px 24px -12px rgba(44, 36, 27, .18);
  --shadow-lift: 0 2px 4px rgba(44, 36, 27, .06), 0 18px 36px -16px rgba(44, 36, 27, .28);

  --radius:    6px;
  --radius-lg: 12px;

  --font-head: "Vazirmatn", "Noto Naskh Arabic", Tahoma, "Segoe UI", sans-serif;
  --font-body: "Noto Naskh Arabic", "Vazirmatn", Tahoma, "Segoe UI", serif;

  --gutter: 16px;
  --maxw: 1120px;
  --section-y: 64px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand:      #1B1814;
    --paper:     #221E19;
    --card:      #2A251F;
    --ink:       #EFE7D8;
    --ink-soft:  #C4B8A3;
    --moss:      #9CA27F;
    --moss-deep: #30352A;
    --line:      #3D362D;

    --accent-text: #B5BB96;
    --btn-bg:      #A9B08A;
    --btn-bg-hover:#BCC29E;
    --btn-ink:     #1B1814;
    --dark-bg:     #2B3025;
    --dark-ink:    #F1EBDD;
    --dark-soft:   #CFC9B6;
    --dark-line:   rgba(241, 235, 221, .16);
    --footer-bg:   #131110;
    --footer-ink:  #E7DFCF;
    --footer-soft: #ADA18D;
    --header-bg:   rgba(27, 24, 20, .8);
    --track:       #3A342B;
    --focus:       #8FB8E0;
    --masc:        #E59B63;
    --masc-soft:   #3D2C20;
    --fem:         #6CC2B7;
    --fem-soft:    #1F3432;
    --shadow:      0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 36px -16px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 2.1;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); line-height: 1.3; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-text); text-underline-offset: .3em; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-radius: var(--radius);
  font-family: var(--font-head);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--accent-text);
  margin: 0 0 .6rem;
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section { padding-block: var(--section-y); }
.section-paper { background: var(--paper); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-lead { color: var(--ink-soft); font-size: 1.06rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--card); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 1;
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
  border-style: dashed;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
}
.btn-icon:hover { background: var(--paper); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
  color: var(--ink);
  margin: 0;
}
.wordmark-fa { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; }
.wordmark-en {
  font-family: var(--font-head);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--ink-soft);
  margin-top: 3px;
  text-align: right;
}

.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}
.site-nav a:hover { background: var(--paper); }

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  place-items: center;
  cursor: pointer;
}

@media (max-width: 719px) {
  .nav-toggle { display: inline-grid; }
  .header-cta { padding: 0 12px; }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    margin: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; gap: 0; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav li:last-child a { border-bottom: 0; }
}
@media (max-width: 379px) {
  .header-cta { font-size: .85rem; }
  .wordmark-fa { font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 48px 64px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy h1 { margin-bottom: .45em; }
.hero-lead {
  font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 1.6em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .92rem;
  color: var(--ink-soft);
}
.hero-meta strong { font-family: var(--font-head); font-weight: 600; color: var(--ink); }

.hero-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--moss);
}
.pillars {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: stretch;
  min-height: 220px;
}
.pillar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.pillar-alt {
  justify-content: flex-end;
  background: var(--dark-bg);
  border-color: transparent;
}
.pillar-label { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); line-height: 1.5; }
.pillar-q { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }
.pillar-alt .pillar-label { color: var(--dark-ink); }
.pillar-alt .pillar-q { color: var(--dark-soft); }
.pillar-link { position: relative; }
.pillar-link svg { position: absolute; inset: 12px 6px; width: calc(100% - 12px); height: calc(100% - 24px); }
.hero-card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-head);
  font-size: .85rem;
  color: var(--ink-soft);
}
.hero-card-foot svg { color: var(--moss); }

@media (min-width: 880px) {
  .hero { padding-block: 72px 96px; }
  .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 64px; }
  .pillars { min-height: 280px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 32px; align-items: center; }
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}
.about-copy p { font-size: 1.05rem; }
.topic-list { display: grid; gap: 10px; margin-top: 24px; }
.topic-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.8;
}
.topic-list svg { flex: none; margin-top: 5px; color: var(--accent-text); }
.topic-list strong { font-family: var(--font-head); font-weight: 600; }

@media (min-width: 800px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .about-media { max-width: 440px; }
}
@media (max-width: 799px) {
  .about-media { max-width: 360px; }
  .about-media img { aspect-ratio: 4 / 3; }
}

/* ---------- Dark section (self-assessments) ---------- */
.section-dark {
  background: var(--dark-bg);
  color: var(--dark-ink);
}
.section-dark h2 { color: var(--dark-ink); }
.section-dark .eyebrow { color: var(--dark-soft); }
.section-dark .section-lead { color: var(--dark-soft); }

/* ---------- Test cards ---------- */
.test-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.test-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  min-height: 250px;
}
.test-card h3 { margin: 0; font-size: 1.15rem; line-height: 1.6; }
.test-card p { margin: 0; color: var(--ink-soft); font-size: .98rem; line-height: 1.9; flex: 1; }
.test-card.is-active:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.test-card.is-soon { background: var(--paper); box-shadow: none; }
.test-card.is-soon h3 { color: var(--ink-soft); }
.test-card.is-skeleton {
  background: linear-gradient(90deg, var(--card) 0%, var(--paper) 50%, var(--card) 100%);
  background-size: 200% 100%;
  opacity: .5;
  box-shadow: none;
}
@media (prefers-reduced-motion: no-preference) {
  .test-card.is-skeleton { animation: shimmer 1.4s linear infinite; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

.badge {
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--track);
  color: var(--ink-soft);
}
.badge-live { background: var(--btn-bg); color: var(--btn-ink); }
.badge-draft { background: transparent; border: 1px dashed var(--ink-soft); }

.test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--font-head);
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.test-meta span { display: inline-flex; align-items: center; gap: 6px; }
.test-card .btn { margin-top: 6px; width: 100%; }

.notice {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}

/* ---------- Quiz ---------- */
.quiz {
  margin-top: 28px;
  max-width: 760px;
  margin-inline: auto;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.quiz[hidden] { display: none; }
.quiz-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  padding-inline-start: 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.quiz-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.quiz-body { padding: 24px 20px 28px; }
@media (min-width: 640px) { .quiz-body { padding: 36px 40px 40px; } }

.quiz-body h3 { font-size: 1.35rem; }
.quiz-body :focus { outline: none; }
.quiz-body :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.quiz-intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.quiz-intro-meta span { display: inline-flex; align-items: center; gap: 6px; }
.privacy {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin: 20px 0 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--moss);
  border-radius: var(--radius);
  font-size: .95rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
.privacy svg { flex: none; margin-top: 4px; color: var(--accent-text); }
.draft-note {
  font-family: var(--font-head);
  font-size: .85rem;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-soft);
  border-radius: var(--radius);
  padding: 8px 12px;
  line-height: 1.7;
}
.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* progress */
.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-family: var(--font-head);
  font-size: .85rem;
  color: var(--ink-soft);
}
.progress {
  flex: 1;
  height: 6px;
  background: var(--track);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--moss);
  border-radius: 99px;
  transition: width .3s ease;
}

/* question */
.question { border: 0; margin: 0; padding: 0; min-width: 0; }
.question legend {
  padding: 0;
  margin-bottom: 20px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  line-height: 1.8;
  color: var(--ink);
}
.options { display: grid; gap: 10px; }
@media (min-width: 640px) {
  .options { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
  .option-label { flex-direction: column; justify-content: center; text-align: center; min-height: 92px; }
}
.option { position: relative; }
.option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--font-head);
  font-size: .98rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.option-dot {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
  display: grid;
  place-items: center;
}
.option-dot::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--btn-ink);
  transform: scale(0);
  transition: transform .15s ease;
}
.option input:hover + .option-label { border-color: var(--ink-soft); }
.option input:checked + .option-label {
  border-color: var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-ink);
}
.option input:checked + .option-label .option-dot { border-color: var(--btn-ink); }
.option input:checked + .option-label .option-dot::after { transform: scale(1); }
.option input:focus-visible + .option-label { outline: 3px solid var(--focus); outline-offset: 2px; }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.quiz-nav .btn { min-width: 120px; }
.btn-back[disabled] { visibility: hidden; }

/* result */
.result-top {
  padding: 20px;
  margin: 16px 0 28px;
  border-radius: var(--radius);
  background: var(--dark-bg);
  color: var(--dark-ink);
}
.result-top h3 { color: var(--dark-ink); margin-bottom: .3em; font-size: 1.5rem; }
.result-top p { margin: 0; color: var(--dark-soft); }
.result-kicker { font-family: var(--font-head); font-size: .85rem; color: var(--dark-soft); margin: 0 0 4px; }

.bars { display: grid; gap: 14px; margin-bottom: 28px; }
.bar-row { display: grid; gap: 6px; }
.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-head);
  font-size: .95rem;
  line-height: 1.5;
}
.bar-level { color: var(--ink-soft); font-size: .85rem; }
.bar-track { height: 10px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--moss); border-radius: 99px; transition: width .6s ease; }
.bar-row.is-top .bar-fill { background: var(--btn-bg); }
.bar-row.is-top .bar-head { font-weight: 600; }

.workshop-teaser {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  margin: 8px 0 24px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.workshop-teaser h4 { font-size: 1.02rem; margin: 0 0 2px; color: var(--ink); }
.workshop-teaser p { margin: 0; font-size: .92rem; line-height: 1.8; }
.workshop-teaser svg { flex: none; margin-top: 4px; }

/* ---------- Quiz: profile tests ---------- */
.ico { display: inline-flex; flex: none; }
.muted { color: var(--ink-soft); font-size: .92rem; line-height: 1.9; }
.hint { font-family: var(--font-head); font-size: .85rem; color: var(--ink-soft); }
.tone-masc { --tone: var(--masc); --tone-soft: var(--masc-soft); }
.tone-fem  { --tone: var(--fem);  --tone-soft: var(--fem-soft); }

.poles { display: grid; gap: 12px; margin: 18px 0 8px; }
@media (min-width: 560px) { .poles { grid-template-columns: 1fr 1fr; } }
.pole {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--tone-soft, var(--paper));
  border-inline-start: 4px solid var(--tone, var(--moss));
}
.pole p { margin: 0; font-size: .95rem; line-height: 1.9; }
.pole .pole-title { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--tone); margin-bottom: 4px; }
.intro-note { font-size: .95rem; color: var(--ink-soft); margin: 10px 0 18px; }

.consent { align-items: center; }
.consent-label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--ink); }
.consent-label input { flex: none; width: 22px; height: 22px; margin: 5px 0 0; accent-color: var(--btn-bg); cursor: pointer; }

.about-test {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.about-test summary {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font-head); font-size: .95rem; font-weight: 500;
  list-style: none;
}
.about-test summary::-webkit-details-marker { display: none; }
.about-test summary::after { content: "+"; margin-inline-start: auto; font-size: 1.2rem; color: var(--ink-soft); }
.about-test[open] summary::after { content: "−"; }
.about-test-body { padding: 0 16px 12px; font-size: .95rem; }
.about-test-body h4 { font-size: .98rem; margin: 14px 0 4px; }
.about-test-body p { margin: 0 0 8px; }
.dim-list { margin: 0; display: grid; gap: 2px; }
.dim-list dt { font-family: var(--font-head); font-weight: 600; color: var(--tone, var(--ink)); margin-top: 6px; }
.dim-list dd { margin: 0; color: var(--ink-soft); }
.sources { padding-inline-start: 18px; list-style: disc; font-family: Georgia, "Times New Roman", serif; font-size: .82rem; line-height: 1.6; color: var(--ink-soft); text-align: left; }
.sources li { margin-bottom: 6px; }

/* demographics */
.link-btn {
  background: none; border: 0; padding: 4px 0; margin-bottom: 8px;
  font-family: var(--font-head); font-size: .85rem; color: var(--accent-text);
  text-decoration: underline; text-underline-offset: .3em; cursor: pointer;
}
.demo-field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.demo-field legend { font-family: var(--font-head); font-weight: 500; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.chip label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 99px; background: var(--card);
  font-family: var(--font-head); font-size: .92rem; cursor: pointer;
}
.chip input:checked + label { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.chip input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* scores */
.scores { margin-bottom: 24px; }
.score-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.score-tile {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--tone-soft, var(--paper));
  border: 1px solid var(--line);
}
.score-tile p { margin: 0; }
.score-name { font-family: var(--font-head); font-weight: 600; color: var(--tone, var(--ink)); }
.score-value { font-family: var(--font-head); font-weight: 600; font-size: 2rem; line-height: 1.4; }
.score-value span { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.score-rows { display: grid; gap: 12px; }
.score-rows .bar-head span:first-child { color: var(--tone, var(--ink)); }
.bar-tone .bar-fill { background: var(--tone, var(--moss)); }
.score-tile .bar-track { background: var(--card); }
.bar-thin { height: 6px; }

/* map */
.map-figure { margin: 0 0 24px; }
.compass-map { width: 100%; max-width: 380px; height: auto; margin-inline: auto; font-family: var(--font-head); overflow: visible; }
.map-frame { fill: var(--paper); stroke: var(--line); }
.map-quad { fill: var(--moss); fill-opacity: .08; }
.map-cut { stroke: var(--ink-soft); stroke-dasharray: 4 4; stroke-opacity: .6; }
.map-cell { fill: var(--moss); }
.map-qlabel { font-size: 10px; fill: var(--ink-soft); }
.map-tick { font-size: 9px; fill: var(--ink-soft); }
.map-axis { font-size: 12px; font-weight: 600; fill: var(--tone, var(--ink)); }
.map-halo { fill: var(--ink); fill-opacity: .15; }
.map-dot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.map-you { font-size: 11px; font-weight: 600; fill: var(--ink); }
.map-figure figcaption { text-align: center; margin-top: 6px; }

/* comparison */
.compare {
  padding: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.compare h4 { margin-bottom: 6px; }
.compare-wait {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--paper);
  font-size: .95rem;
  line-height: 1.9;
}
.table-wrap { overflow-x: auto; }
.pct-table { width: 100%; border-collapse: collapse; font-family: var(--font-head); font-size: .9rem; line-height: 1.6; }
.pct-table th, .pct-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; }
.pct-table thead th { font-weight: 500; font-size: .8rem; color: var(--ink-soft); }
.pct-table tbody th { font-weight: 600; color: var(--tone, var(--ink)); }
.legend { display: flex; gap: 16px; margin: 0 0 8px; font-family: var(--font-head); font-size: .85rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 12px; height: 12px; border-radius: 3px; background: var(--tone); }
.group-block { margin-bottom: 12px; }
.group-title { font-family: var(--font-head); font-size: .85rem; color: var(--ink-soft); margin: 10px 0 4px; }
.group-list { display: grid; gap: 8px; }
.group-list li {
  display: grid;
  grid-template-columns: minmax(96px, 1.2fr) 1fr 1fr;
  gap: 10px;
  align-items: center;
  font-family: var(--font-head);
  font-size: .88rem;
  line-height: 1.5;
}
.group-list small { color: var(--ink-soft); font-size: .75rem; }
.group-val { display: flex; align-items: center; gap: 6px; }
.group-val .bar-track { flex: 1; }

/* flags, practice, share */
.flag {
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--tone-soft, var(--paper));
  border-inline-start: 4px solid var(--tone, var(--moss));
}
.flag p { margin: 0 0 6px; font-size: .98rem; line-height: 2; }
.flag .flag-title { font-family: var(--font-head); font-weight: 600; color: var(--tone); margin-bottom: 4px; }
.flag-q { margin: 0 !important; }
.practice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1.5px solid var(--moss);
  border-radius: var(--radius);
}
.practice p { margin: 0; line-height: 2; }
.practice .ico { margin-top: 6px; color: var(--accent-text); }
.result-note { font-size: 1.02rem; padding: 4px 0 8px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.share-block { margin-bottom: 20px; }
.share-status { margin: 8px 0 0; font-family: var(--font-head); font-size: .85rem; color: var(--ink-soft); word-break: break-all; }
.result-disclaimer {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 24px 0 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .88rem; line-height: 1.9; color: var(--ink-soft);
}
.result-disclaimer .ico { margin-top: 5px; }

.share-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(20, 17, 13, .6);
}
.share-dialog {
  width: min(100%, 420px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.share-dialog h3 { font-size: 1.1rem; }
.share-dialog img { width: 100%; height: auto; max-height: 55vh; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 860px;
  margin-inline: auto;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--moss);
  border-radius: var(--radius-lg);
}
.disclaimer h2 { font-size: 1.15rem; margin-bottom: .35em; }
.disclaimer p { margin: 0; color: var(--ink-soft); }
.disclaimer p + p { margin-top: .6em; }
.disclaimer-urgent { font-weight: 500; color: var(--ink) !important; }
.disclaimer-icon { flex: none; color: var(--accent-text); margin-top: 2px; }
@media (min-width: 640px) { .disclaimer { padding: 28px 32px; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-soft);
  padding-top: 56px;
  font-size: .95rem;
}
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 40px; }
.wordmark-footer { color: var(--footer-ink); margin-bottom: 12px; }
.wordmark-footer .wordmark-en { color: var(--footer-soft); }
.footer-title {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--footer-soft);
  margin-bottom: 12px;
}
.footer-col ul { display: grid; gap: 6px; }
.footer-col a { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-block: 18px 22px;
  border-top: 1px solid rgba(234, 225, 207, .14);
  font-size: .85rem;
}
.footer-bottom p { margin: 0; }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --section-y: 88px; --header-h: 72px; }
}
