/* Test iniziatico dei Quattro Elementi — test/quattro-elementi/ e en/test/quattro-elementi/.
   La base (colori, barra, testo, piè di pagina) è la stessa della pagina
   privacy, già allineata ai token di style.css: chi cambia un colore lì
   lo cambia anche qui. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@font-face { font-family:'EB Garamond'; font-weight:400; font-style:normal; font-display:swap;
  src: url('../fonts/eb-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'EB Garamond'; font-weight:500; font-style:normal; font-display:swap;
  src: url('../fonts/eb-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'EB Garamond'; font-weight:600; font-style:normal; font-display:swap;
  src: url('../fonts/eb-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'EB Garamond'; font-weight:400; font-style:italic; font-display:swap;
  src: url('../fonts/eb-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:400; font-style:normal; font-display:swap;
  src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:500; font-style:normal; font-display:swap;
  src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:600; font-style:normal; font-display:swap;
  src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root {
  --gold: #c9973a;
  --gold-light: #e8c97a;
  --gold-rgb: 201,151,58;        /* canali per le trasparenze, come nel sito */
  --gold-light-rgb: 232,201,122;
  --radius-sm: 6px;
  --text: #e8e0f0;
  --text-muted: #c4b8d0;
  --bg: #0d0b1a;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(var(--gold-rgb),0.18);
  --border-hover: rgba(var(--gold-rgb),0.4);
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'EB Garamond', Georgia, serif;
  --on-gold: #1a1000;
  /* Mappa dell'Enneagramma: energia carica (verde) e scarica (rossa) */
  --ok-rgb: 40,160,80;
  --ok-text: #7de0a0;
  --ko-rgb: 224,125,125;
  --ko-text: #e8a0a0;
}
[data-theme="light"] {
  /* stessi valori del tema chiaro di style.css */
  --gold: #816018;
  --gold-light: #7d5b1c;
  --gold-rgb: 184,138,46;
  --gold-light-rgb: 184,138,46;
  --text: #2a1f08;
  --text-muted: #5a4a3a;
  --bg: #f5f0e8;
  --surface: rgba(0,0,0,0.03);
  --border: rgba(120,90,30,0.30);
  --border-hover: rgba(120,90,30,0.55);
  --on-gold: #f8f2e6;
  --ok-rgb: 30,120,60;
  --ok-text: #14542c;
  --ko-rgb: 160,40,40;
  --ko-text: #8f2020;
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
main [id] { scroll-margin-top: 5.5rem; }
@media (max-width: 768px) {
  html { scroll-padding-top: 4.5rem; }
  main [id] { scroll-margin-top: 4.5rem; }
}
body {
  font-family: var(--font-sans);
  background: var(--bg); color: var(--text);
  line-height: 1.72; font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative; z-index: 1;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(46,31,110,0.28) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
[data-theme="light"] body::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--gold-rgb),0.08) 0%, transparent 65%);
}

/* NAV */
nav.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,11,26,0.9); backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
}
[data-theme="light"] nav.topnav { background: rgba(245,240,232,0.92); }
.nav-logo {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  color: var(--gold-light); letter-spacing: 0.04em; text-decoration: none;
}
.nav-back {
  font-family: var(--font-sans); font-size: 14px;
  color: var(--text-muted); text-decoration: none;
  letter-spacing: 0.04em; transition: color 0.2s;
}
.nav-back:hover { color: var(--gold-light); }
.nav-logo, .nav-back { display: inline-flex; align-items: center; gap: 0.35em; min-height: 44px; }
/* sotto i 680px la barra non ci sta su una riga: il logo porta già alla
   home, quindi si nasconde il link di ritorno e la scritta del tema */
@media (max-width: 679px) {
  nav.topnav { padding: 0.5rem 1rem; }
  .nav-right { gap: 0.5rem; }
  .nav-back, .theme-toggle .lbl { display: none; }
  .theme-toggle { padding: 5px 10px; }
  .nav-logo { font-size: 18px; }
}
.nav-right { display: flex; align-items: center; gap: 1rem; }
.theme-toggle {
  background: none; border: 0.5px solid var(--border);
  border-radius: 999px; padding: 5px 14px 5px 10px;
  cursor: pointer; color: var(--gold-light);
  font-size: 13px; line-height: 1;
  font-family: var(--font-sans); font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap; min-width: 44px; min-height: 44px;
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--gold); background: var(--surface); }
.theme-toggle-icon { display: inline-flex; line-height: 1; }

/* MAIN */
main {
  max-width: 760px; margin: 0 auto;
  padding: 4rem 2rem 5rem;
  position: relative; z-index: 1;
}

.page-eyebrow {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.page-eyebrow::after {
  content: ''; flex: 1; height: 0.5px;
  background: linear-gradient(90deg, rgba(var(--gold-rgb),0.55) 0%, transparent 100%);
}

h1.page-title {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px);
  font-weight: 500; color: var(--text);
  line-height: 1.15; margin-bottom: 0.5rem; letter-spacing: 0.01em;
}
.page-sub {
  font-family: var(--font-display); font-style: italic;
  font-size: 18px; color: var(--gold-light);
  margin-bottom: 2.5rem; letter-spacing: 0.01em;
}
.page-updated {
  font-family: var(--font-sans); font-size: 13px;
  color: var(--text-muted); margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  color: var(--gold-light); margin-top: 2.75rem; margin-bottom: 1rem;
  letter-spacing: 0.01em; line-height: 1.3;
  display: flex; align-items: baseline; gap: 0.75rem;
}


h3 {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  color: var(--text); margin-top: 1.5rem; margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

p {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.78; margin-bottom: 1rem;
}
p strong { color: var(--text); font-weight: 600; }
a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s; }
a:hover { color: var(--gold); }

ul, ol {
  margin: 0.5rem 0 1.25rem 0;
  padding-left: 1.25rem;
}
li {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.78; margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
ul li::marker { color: var(--gold); content: '◆ '; font-size: 9px; }
ol li::marker { color: var(--gold); font-family: var(--font-display); font-style: italic; }

/* CARD */
.info-card {
  position: relative;
  background: rgba(255,255,255,0.018);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0;
}
[data-theme="light"] .info-card {
  background: rgba(255,255,255,0.6);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.info-card::before {
  content: ''; position: absolute;
  inset: 6px; border-radius: 9px;
  border: 0.5px solid rgba(var(--gold-rgb),0.12);
  pointer-events: none;
}
.info-card > * { position: relative; z-index: 1; }
.info-card h3 { margin-top: 0; }
.info-card p:last-child { margin-bottom: 0; }

/* DIVIDER */
.epigraphic-rule {
  display: flex; align-items: center; justify-content: center;
  gap: 1.25rem; max-width: 700px; margin: 3rem auto 1rem; padding: 0 2rem;
}
.epigraphic-rule::before, .epigraphic-rule::after {
  content: ''; flex: 1; height: 0.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--gold-rgb),0.45) 50%, transparent 100%);
}
.epigraphic-rule .glyph {
  color: var(--gold); font-size: 8px; opacity: 0.7;
  letter-spacing: 0.4em;
}

/* FOOTER */
footer {
  background: rgba(0,0,0,0.55);
  border-top: 0.5px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 2rem 2.5rem;
}
[data-theme="light"] footer { background: rgba(30,25,18,0.92); color: #c4b8d0; }
[data-theme="light"] footer p { color: #c4b8d0; }
[data-theme="light"] footer a { color: #c4b8d0; }
[data-theme="light"] footer a:hover { color: #e8c97a; }
.footer-logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  color: var(--gold-light); margin-bottom: 0.5rem; letter-spacing: 0.02em;
}
footer p { font-size: 13px; line-height: 1.7; opacity: 0.85; }
footer a { color: var(--gold-light); }

/* SKIP LINK */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--gold); color: var(--on-gold);
  padding: 0.5rem 1rem; border-radius: 0 0 8px 8px;
  font-size: 14px; font-weight: 500; z-index: 200;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* FOCUS */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px; border-radius: 4px;
}

  /* Language switcher pill */
  .lang-pill{display:inline-flex;align-items:center;gap:0;border:0.5px solid var(--border);border-radius:999px;padding:2px;margin-right:0.25rem;font-family:var(--font-sans);font-size:12px;font-weight:600;letter-spacing:0.06em}
  .lang-pill a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:32px;padding:4px 10px;border-radius:999px;text-decoration:none;transition:color .2s,background .2s;line-height:1}
  .lang-pill a.lang-active{background:var(--gold);color:var(--on-gold)}
  .lang-pill a:not(.lang-active){color:var(--text-muted)}
  .lang-pill a:not(.active):hover{color:var(--gold-light)}
  .lang-pill .lang-dot{color:var(--border);font-size:8px;padding:0 1px;user-select:none}

/* ─── TEST ─── */
.test-intro { margin-bottom: 1rem; }
.test-intro ul { margin-top: 0.25rem; }
/* Le istruzioni si richiudono: chi riprende il test con risposte salvate le
   trova chiuse (test.js) e arriva prima alla prima domanda. */
.test-intro summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.test-intro summary::-webkit-details-marker { display: none; }
.test-intro summary h2 { margin: 0; }
.test-intro summary::after { content: '\25BE'; color: var(--gold); font-size: 14px; }
.test-intro[open] summary::after { content: '\25B4'; }
.test-intro summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.test-intro > :not(summary) { margin-top: 0.5rem; }
.test-intro + .test-scale-note { margin-bottom: 2rem; }
.code-legend { font-family: var(--font-sans); font-size: 13px; line-height: 1.5; color: var(--text-muted); margin-top: 0.7rem; font-variant-numeric: normal; }
.test-scale-note { font-size: 14px; color: var(--text-muted); }
/* soglie dei Quattro Elementi nelle istruzioni: una tabella al posto di sei voci */
.soglie-table { font-size: 14px; margin: 0.5rem 0 0.75rem; }
.soglie-table th, .soglie-table td { padding: 0.45rem 0.6rem 0.45rem 0; }
.soglie-table thead th { color: var(--gold); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.soglie-table tbody th { white-space: nowrap; font-variant-numeric: tabular-nums; }

.test-section { margin-top: 3rem; }
.test-section h2 { margin-top: 0; margin-bottom: 0.25rem; }
.test-section-sub {
  font-family: var(--font-display); font-style: italic;
  font-size: 17px; color: var(--gold-light); margin-bottom: 0.25rem;
}
.test-section-note { font-size: 14px; color: var(--text-muted); margin-bottom: 1rem; }
.test-center { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--text); margin: 1.5rem 0 0.5rem; }

.q {
  border: 0.5px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem; margin: 0 0 0.75rem;
  background: rgba(255,255,255,0.018);
}
[data-theme="light"] .q { background: rgba(255,255,255,0.6); }
.q.missing { border-color: var(--gold); }
.q legend {
  float: left; width: 100%; padding: 0; margin-bottom: 0.75rem;
  font-size: 16px; line-height: 1.6; color: var(--text);
}
.q legend + * { clear: both; }
.scale { display: grid; gap: 6px; }
.scale-5 { grid-template-columns: repeat(5, 1fr); }
.scale-10 { grid-template-columns: repeat(10, 1fr); }
.scale label { position: relative; display: block; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale span {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: 10px;
  border: 0.5px solid var(--border-hover);
  font-family: var(--font-sans); font-size: 15px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-variant-numeric: tabular-nums;
}
.scale label:hover span { border-color: var(--gold); color: var(--gold-light); }
.scale input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.scale input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.scale-ends {
  display: flex; justify-content: space-between; margin-top: 0.35rem;
  font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .scale-10 { grid-template-columns: repeat(5, 1fr); }
}
/* nella colonna da 760px cinque pulsanti per una cifra sola erano larghi
   140px l'uno: la scala si ferma a 440px (640 quella a 10) e le scritte
   «minimo / massimo» restano sotto i numeri */
@media (min-width: 640px) {
  .scale-5, .scale-5 + .scale-ends { max-width: 440px; }
  .scale-10, .scale-10 + .scale-ends { max-width: 640px; }
}
/* Sì scelto pieno, No scelto col solo bordo: scorrendo una pagina i sì si
   distinguono senza rileggere la posizione */
.scale-2 label:last-child input:checked + span { background: var(--surface); border-color: var(--gold); color: var(--gold-light); }
/* glifo alchemico dell'Elemento, nei titoli di sezione e nelle schede del risultato */
.el-glyph { width: 0.72em; height: 0.72em; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linejoin: round; align-self: center; }
h2 .el-glyph { margin-right: 0.1em; }

.test-actions {
  position: sticky; bottom: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
  margin: 2.5rem -1rem 0; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(13,11,26,0.92); backdrop-filter: blur(12px);
  border-top: 0.5px solid var(--border);
}
[data-theme="light"] .test-actions { background: rgba(245,240,232,0.94); }
.test-progress { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* un segmento per sezione (o per pagina), che si riempie d'oro con le
   risposte; lo costruisce test.js. Nei test a pagine la pagina aperta ha la
   traccia più scura */
.test-segments { flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.test-segments span { display: block; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.test-segments span.cur { background: rgba(var(--gold-rgb),0.38); }
.test-segments i { display: block; height: 100%; background: var(--gold); transition: width 0.2s; }
.btn-test {
  /* come .btn-primary e .btn-ghost del sito */
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0.8rem 2rem; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--gold); color: var(--on-gold);
  font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: 0.04em;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.16s ease;
}
.btn-test:hover { background: var(--gold-light); }
.btn-test:active { transform: scale(0.97); }
.btn-test-ghost {
  background: none; border: 1px solid var(--border-hover); color: var(--gold-light);
}
.btn-test-ghost:hover { background: rgba(var(--gold-rgb),0.08); border-color: var(--gold); }

.test-result { margin-top: 3rem; }
.test-result[hidden] { display: none; }
.code-box {
  margin: 1rem 0 1.5rem; padding: 1.25rem 1.5rem; border-radius: 14px;
  border: 0.5px solid var(--border-hover); text-align: center;
  font-family: var(--font-display); font-size: 22px; line-height: 1.5; color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.result-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; font-size: 15px; }
.result-table th, .result-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 0.5px solid var(--border); vertical-align: top; }
.result-table th { font-weight: 500; color: var(--text); }
.result-table td { color: var(--text-muted); }
.result-table td.num { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.test-closing {
  margin-top: 2rem; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--gold-light);
}
.test-key p, .test-key li { font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.code-group { display: inline-block; margin: 0 0.35em; }
@media (max-width: 479px) { .code-group { display: block; margin: 0; } }
.code-item { white-space: nowrap; }
.code-pair { display: inline-block; }
.test-consult {
  margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: 14px;
  border: 0.5px solid var(--border-hover);
}
.test-consult h3 { margin-top: 0; }
.test-consult p { margin-bottom: 0.75rem; }
.test-consult-flag { color: var(--text); font-weight: 500; }
a.btn-test { text-decoration: none; }
a.btn-test:hover { color: var(--on-gold); }
a.btn-test-ghost:hover { color: var(--gold-light); }
.excess-desc {
  margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; border-radius: 12px;
  border: 0.5px solid var(--border);
}
.excess-desc h3 { margin-top: 0; }
.excess-desc li { font-size: 15px; }
.code-copy { justify-content: center; margin: -0.5rem 0 1.75rem; }
/* Quattro Elementi: una scheda per Elemento con due barre (qualità piena,
   eccesso attenuata) e le tacche alle soglie; dominante e mancante hanno il
   bordo e il nome in oro chiaro */
.el-cards { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.5rem 0 1.25rem; }
.el-card { padding: 0.9rem 1.1rem 1rem; border-radius: 12px; border: 0.5px solid var(--border); background: rgba(255,255,255,0.018); }
[data-theme="light"] .el-card { background: rgba(255,255,255,0.6); }
.el-card.off { border-color: var(--border-hover); }
.el-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.el-name { display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--text); }
.el-card.off .el-name { color: var(--gold-light); }
.el-status { font-size: 13px; color: var(--text-muted); }
.el-bars { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem 0.65rem; align-items: center; font-size: 13px; color: var(--text-muted); }
.el-bars .num { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.el-track { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--border); }
.el-track i { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; background: var(--gold); }
.el-track.excess i { background: rgba(var(--gold-rgb),0.55); }
.el-track b { position: absolute; top: -4px; width: 1px; height: 16px; background: var(--text); opacity: 0.8; }
.el-state { margin: 0.6rem 0 0; font-size: 14px; color: var(--text); }
.el-card.off .el-state { color: var(--gold-light); }

/* Profilo temperamentale */
.temp-el { display: block; font-size: 13px; color: var(--text-muted); font-weight: 400; }
.result-table td.temp-bar-cell { width: 34%; vertical-align: middle; }
.code-line { display: block; }
.temp-bar-track { display: block; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.temp-bar { display: block; height: 100%; border-radius: 999px; background: var(--gold); }
.temp-predominant { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--gold-light); margin: 0.25rem 0 1rem; }
.temp-profiles { margin-top: 2.5rem; }
.temp-profiles > h3 { font-size: 24px; line-height: 1.3; color: var(--gold-light); margin-bottom: 0.5rem; }
h4.temp-group { margin: 1.75rem 0 0.25rem; font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--text); }
.temp-profile { margin: 0.75rem 0 1.5rem; padding: 1.1rem 1.25rem; border-radius: 12px; border: 0.5px solid var(--border); }
.temp-profile p { font-size: 16px; }
.temp-profile p:last-child { margin-bottom: 0; }
h5.temp-profile-title { margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--gold-light); }
.temp-profile-sub { font-family: var(--font-display); font-style: italic; color: var(--gold-light); margin-bottom: 0.75rem; }
.temp-work { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 10px; background: var(--surface); }
.temp-work .temp-work-label { margin: 0 0 0.35rem; font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.temp-more { padding: 0; }
.temp-more summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px;
  padding: 0.7rem 1.25rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--gold-light);
}
.temp-more summary::-webkit-details-marker { display: none; }
.temp-more summary::after { content: '+'; font-family: var(--font-sans); font-weight: 400; color: var(--gold); }
.temp-more[open] summary::after { content: '−'; }
.temp-more summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 12px; }
.temp-more-pct { margin-left: auto; font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.temp-more > :not(summary) { margin-left: 1.25rem; margin-right: 1.25rem; }
.temp-more[open] { padding-bottom: 1.1rem; }

/* Mappa antropologica dell'Enneagramma */
.test-attrib { font-size: 14px; color: var(--text-muted); margin: -1.25rem 0 2rem; }
.scale-2 { grid-template-columns: repeat(2, 1fr); max-width: 260px; }
/* dai 640px in su Sì e No stanno a destra del testo, nella stessa colonna
   scheda dopo scheda. Il fieldset non mette la legend in riga con flex o
   grid (resta la didascalia del riquadro), quindi si usano i float: la
   legend è già float:left, qui si stringe e il gruppo va a destra. */
@media (min-width: 640px) {
  .q:has(.scale-2) { display: flow-root; padding: 0.85rem 1.1rem; }
  .q:has(.scale-2) legend { width: calc(100% - 236px - 1.5rem); margin: 0; padding: 9px 0; }
  .q:has(.scale-2) .scale-2 { float: right; clear: none; width: 236px; max-width: none; }
}
.test-section[hidden] { display: none; }
.test-section h2[tabindex="-1"]:focus { outline: none; }
.sez-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.enn { display: block; width: min(100%, 420px); margin: 1.5rem auto; }
.enn-circle { fill: none; stroke: var(--border-hover); stroke-width: 1; }
.enn-lines line { stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; opacity: 0.85; }
.enn-n { font-family: var(--font-display); font-size: 13px; fill: var(--text-muted); text-anchor: middle; dominant-baseline: middle; }
.enn-box rect { stroke-width: 1; }
.enn-box text { font-family: var(--font-display); font-size: 19px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
/* oltre al colore, il riquadro delle energie scariche ha il bordo tratteggiato */
.enn-box.su rect { fill: rgba(var(--ok-rgb),0.1); stroke: var(--ok-text); }
.enn-box.su text { fill: var(--ok-text); }
.enn-box.giu rect { fill: rgba(var(--ko-rgb),0.08); stroke: var(--ko-text); stroke-dasharray: 4 3; }
.enn-box.giu text { fill: var(--ko-text); }
/* test del tipo: primario pieno, ala e secondo tipo forte col bordo, gli altri attenuati */
.enn-box rect { fill: var(--surface); stroke: var(--border-hover); }
.enn-box text { fill: var(--text-muted); }
.enn-box.vicino rect { stroke: var(--gold); stroke-width: 1.5; }
.enn-box.vicino text { fill: var(--gold-light); }
.enn-box.top rect { fill: var(--gold); stroke: var(--gold); }
.enn-box.top text { fill: var(--on-gold); }
.enn-media { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); margin-bottom: 1rem; }
.enn-media b { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text); }
.enn-legenda { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 0.5rem; }
.enn-equilibrio { text-align: center; font-family: var(--font-display); font-size: 18px; color: var(--text); margin-bottom: 1.5rem; }
.enn-table th { white-space: nowrap; }

/* Frasi tipiche: una casella per frase, tutta la scheda è cliccabile */
.q-check { padding: 0; }
.q-check label { display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1.1rem; min-height: 44px; cursor: pointer; }
.q-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-mark {
  flex: none; width: 24px; height: 24px; margin-top: 0.1rem; border-radius: 6px;
  border: 1px solid var(--border-hover); display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.q-mark::after { content: '\2713'; font-size: 15px; font-weight: 600; color: var(--on-gold); opacity: 0; }
.q-check label:hover .q-mark { border-color: var(--gold); }
.q-check input:checked ~ .q-mark { background: var(--gold); border-color: var(--gold); }
.q-check input:checked ~ .q-mark::after { opacity: 1; }
.q-check input:checked ~ .q-text { color: var(--text); }
.q-check input:focus-visible ~ .q-mark { outline: 2px solid var(--gold); outline-offset: 2px; }
.q-text { font-size: 16px; line-height: 1.6; color: var(--text-muted); transition: color 0.15s; }
.q-check:has(input:checked) { border-color: var(--border-hover); }
.code-sub { font-size: 16px; font-family: var(--font-sans); color: var(--text-muted); }
.result-table tr.enn-top th, .result-table tr.enn-top td { color: var(--gold-light); }
.enn-focus { padding: 0.9rem 1.1rem; border-radius: 12px; border: 0.5px solid var(--border); }
.enn-focus strong { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--gold-light); }
.temp-more > p { margin-top: 0.25rem; }
.temp-more-pct { white-space: nowrap; }
.stato.su, .enn-equilibrio.su { color: var(--ok-text); }
.stato.giu, .enn-equilibrio.giu { color: var(--ko-text); }
