@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,300..700&family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');
/* display=swap already in URL above — covers FOIT */

:root {
  --bg:#f4ede1;--surface:#fffaf5;--surface2:#ede5d8;--border:#d8cfc4;
  --primary:#a8311e;--primary-l:#fdeee9;--primary-d:#7d2215;
  --accent:#a8311e;--text:#1a1510;--muted:#7a6e65;
  --card-bg:#fffaf5;--text-muted:#7a6e65;
  --font-serif:'Source Serif 4',Georgia,serif;
  --font-sans:'Figtree',system-ui,sans-serif;
  --font-mono:'JetBrains Mono',monospace;
  --radius:16px;--shadow:0 4px 20px rgba(120,55,18,.08),0 1px 4px rgba(0,0,0,.04);
  --shadow-sm:0 2px 8px rgba(120,55,18,.06);
  --tr:.2s cubic-bezier(.4,0,.2,1);
  --c-sicurezza:#1f3fa8;--c-diritti:#b83558;--c-economia:#c97014;
  --c-elettorale:#0b7a8c;--c-ambiente:#2d7a4f;--c-istituzioni:#3d3d3d;
  --c-geopolitica:#564099;--c-giustizia:#a8311e;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:hidden}
body{font-family:var(--font-sans);background:var(--bg);color:var(--text);min-height:100vh;display:flex;flex-direction:column;align-items:center;padding-top:52px;overflow-x:hidden;max-width:100vw}

/* top band */
.top-band{width:100%;height:4px;background:linear-gradient(90deg,#009246,#fff 50%,#ce2b37);flex-shrink:0}
.page{width:100%;max-width:700px;padding:0 1.25rem 5rem}

/* header */
.header{padding:2.75rem 0 2.25rem;animation:fadeDown .5s ease both}
.header h1{font-family:var(--font-serif);font-size:clamp(1.9rem,6.5vw,3rem);font-weight:400;line-height:1.15;letter-spacing:-.01em}
.header h1 em{font-style:italic;color:var(--primary)}
.header .subtitle{margin-top:.7rem;color:var(--muted);font-size:.95rem;line-height:1.65;max-width:460px;font-weight:400}
.header-rule{width:40px;height:3px;background:var(--primary);border-radius:99px;margin:1.1rem 0}

/* progress */
.progress-area{margin-bottom:1.1rem;animation:fadeDown .5s .06s ease both}
.progress-top{display:flex;align-items:center;gap:.75rem;margin-bottom:.55rem}
.back-btn{display:flex;align-items:center;gap:.3rem;background:var(--surface);border:1.5px solid var(--border);border-radius:99px;color:var(--muted);cursor:pointer;font-family:var(--font-sans);font-size:.75rem;font-weight:700;padding:.3rem .75rem;transition:border-color var(--tr),color var(--tr);white-space:nowrap;flex-shrink:0}
.back-btn:hover{border-color:var(--primary);color:var(--primary)}
.back-btn.hidden{visibility:hidden;pointer-events:none}
.progress-label{font-size:.82rem;font-weight:700;color:var(--text);flex:1}
.progress-pct{font-size:.78rem;color:var(--muted);flex-shrink:0}
.progress-track{height:5px;background:var(--surface);border-radius:99px;overflow:hidden;border:1px solid var(--border)}
.progress-fill{width:0;height:100%;background:linear-gradient(90deg,var(--primary-d),var(--primary),#4eb59e);border-radius:99px;transition:width .45s cubic-bezier(.4,0,.2,1)}

/* quiz card */
.quiz-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:2rem 1.75rem 1.75rem;will-change:transform,opacity}
.quiz-card.with-banner{border-top:none;border-radius:0 0 var(--radius) var(--radius);box-shadow:none;padding-top:1.5rem}
.axis-badge{display:inline-flex;align-items:center;gap:.3rem;font-size:.65rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;padding:.22rem .7rem;border-radius:99px;margin-bottom:.9rem; border:none; color:#fff;}
#question-text{font-family:var(--font-serif);font-size:clamp(1.75rem,5.5vw,2.8rem);font-weight:400;line-height:1.3;color:var(--text);margin-bottom:1.75rem}
.answers-label{font-size:.62rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 .6rem}
.answers{display:grid;grid-template-columns:repeat(5,1fr);gap:.45rem}
.answer-btn{background:var(--surface);border:1px solid var(--border);border-radius:12px;color:var(--text);cursor:pointer;font-family:var(--font-sans);font-size:.72rem;font-weight:600;padding:1.1rem .4rem .85rem;text-align:center;width:100%;display:flex;flex-direction:column;align-items:center;gap:.55rem;line-height:1.25;transition:border-color var(--tr),background var(--tr),transform var(--tr)}
.answer-btn:hover:not(:disabled){transform:translateY(-3px)}
.answer-btn:active:not(:disabled){transform:scale(.98) translateY(-1px)}
.answer-btn:disabled{opacity:.5;cursor:not-allowed}
.btn-icon{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:800;flex-shrink:0}
.btn-label{font-size:.72rem;font-weight:600;line-height:1.2;text-align:center}

/* COLORI DELLE ICONE A RIPOSO */
.answer-btn[data-m="1"]    .btn-icon { background: #2d7a4f; color: #fff; }
.answer-btn[data-m="0.5"]  .btn-icon { background: #2d7a4f; color: #fff; }
.answer-btn[data-m="0"]    .btn-icon { background: #8e8378; color: #fff; }
.answer-btn[data-m="-0.5"] .btn-icon { background: #c04230; color: #fff; }
.answer-btn[data-m="-1"]   .btn-icon { background: #c04230; color: #fff; }

/* EFFETTI HOVER SPECIFICI */

/* 1. D'accordo (Verde) */
.answer-btn[data-m="1"]:hover:not(:disabled),
.answer-btn[data-m="0.5"]:hover:not(:disabled) {
  border-color: #16a34a;
  background: #f0fdf4;
}

/* 2. Neutrale (Grigio) */
.answer-btn[data-m="0"]:hover:not(:disabled) {
  border-color: #94a3b8; 
  background: #f8fafc;
}

/* 3. In Disaccordo (Rosso) */
.answer-btn[data-m="-0.5"]:hover:not(:disabled),
.answer-btn[data-m="-1"]:hover:not(:disabled) {
  border-color: #ef4444; 
  background: #fef2f2;
}

.quiz-card.leave{animation:slideOut .2s ease forwards}
.quiz-card.enter{animation:slideIn .27s ease both}

/* priority */
#priority-section{display:none;animation:fadeUp .45s ease both}
.priority-header{padding:2rem 0 1.5rem}
.priority-header h2{font-family:var(--font-serif);font-size:clamp(1.5rem,5vw,2rem);font-weight:400;letter-spacing:-.01em;line-height:1.2}
.priority-header h2 em{font-style:italic;color:var(--primary)}
.priority-header p{color:var(--muted);font-size:.9rem;margin-top:.5rem;line-height:1.6}
.priority-list{display:flex;flex-direction:column;gap:.45rem;margin-bottom:1.5rem}
.priority-item{background:var(--surface);border:1.5px solid var(--border);border-radius:11px;cursor:pointer;display:flex;align-items:center;gap:.85rem;padding:.75rem 1rem;text-align:left;width:100%;transition:border-color var(--tr),background var(--tr);font-family:var(--font-sans)}
.priority-item:hover{border-color:var(--primary);background:var(--primary-l)}
.priority-item.selected{border-color:var(--primary);background:var(--primary-l)}
.priority-item.selected .p-check{background:var(--primary);border-color:var(--primary);color:#fff}
.p-badge{font-size:.6rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;padding:.18rem .5rem;border-radius:99px;flex-shrink:0;color:#fff;border:none}
.p-text{flex:1;font-size:.84rem;font-weight:500;color:var(--text);line-height:1.45}
.p-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--border);background:var(--surface2);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:800;color:transparent;transition:all var(--tr)}
.priority-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.75rem;position:sticky;bottom:0;background:linear-gradient(to top,var(--bg) 80%,transparent);padding:1rem 0 1.25rem}
.priority-count{font-size:.82rem;font-weight:600;color:var(--muted)}
.priority-count strong{color:var(--primary)}
.btn-confirm{background:var(--primary);border:none;border-radius:99px;color:#fff;cursor:pointer;font-family:var(--font-sans);font-size:.88rem;font-weight:700;padding:.7rem 1.75rem;transition:background var(--tr),transform var(--tr)}
.btn-confirm:hover{background:var(--primary-d);transform:translateY(-1px)}

/* ─── RESULTS ─────────────────────────────── */
#results-section{display:none;animation:fadeUp .5s ease both}
.results-header{padding:2rem 0 .5rem}
.results-header h2{font-family:var(--font-serif);font-size:clamp(1.5rem,5vw,2.1rem);font-weight:400;letter-spacing:-.01em}
.results-header h2 em{font-style:italic;color:var(--primary)}
.results-header p{color:var(--muted);font-size:.88rem;margin-top:.4rem}

/* coord pills */
.coord-row{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:1.5rem; display:none;} /* Nascosto se non serve */

/* section blocks */
.section-block{margin-bottom:2rem}
.section-title{font-family:var(--font-sans);font-size:1.25rem;font-weight:700;letter-spacing:-.015em;margin-bottom:.25rem;display:flex;align-items:center;gap:.5rem}
.section-subtitle{font-size:.8rem;color:var(--muted);margin-bottom:1rem}

/* filter row */
.filter-row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-bottom:1rem}
.filter-label{font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.filter-btns{display:flex;gap:.35rem}
.filter-btn{background:var(--surface2);border:1.5px solid var(--border);border-radius:99px;color:var(--muted);cursor:pointer;font-family:var(--font-sans);font-size:.75rem;font-weight:700;padding:.28rem .85rem;transition:all var(--tr);white-space:nowrap}
.filter-btn:hover{border-color:var(--primary);color:var(--primary)}
.filter-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}

/* ── SECTION A: Party Cards ── */
#party-cards-grid{display:flex;flex-direction:column;gap:.6rem}
.party-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);overflow:hidden;transition:box-shadow var(--tr)}
.party-card:hover{box-shadow:var(--shadow)}
.party-card-header{display:flex;align-items:center;gap:.9rem;padding:1rem 1.25rem;cursor:pointer;user-select:none}
.party-logo-wrap{width:44px;height:44px;border-radius:50%;border:2px solid var(--border);overflow:hidden;flex-shrink:0;background:var(--surface2);display:flex;align-items:center;justify-content:center}
.party-logo-wrap img{width:100%;height:100%;object-fit:cover}
.party-logo-fallback{font-size:.65rem;font-weight:800;color:var(--muted);text-align:center;line-height:1.2;padding:2px}
.party-main{flex:1;min-width:0}
.party-name-label{font-size:.88rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.party-match-bar-wrap{height:5px;background:var(--surface2);border-radius:99px;margin-top:.4rem;overflow:hidden;border:1px solid var(--border)}
.party-match-bar-fill{height:100%;border-radius:99px;transition:width .6s ease}
.party-pct{font-family:var(--font-sans);font-size:1.5rem;font-weight:700;flex-shrink:0;min-width:52px;text-align:right;line-height:1}
.card-chevron{font-size:1rem;color:var(--muted);transition:transform .25s ease;flex-shrink:0;margin-left:.25rem;font-weight:700}
.party-card.open .card-chevron{transform:rotate(90deg)}

/* accordion detail */
.party-detail{display:none;border-top:1px solid var(--border);padding:.75rem 1.25rem 1rem}
.party-card.open .party-detail{display:block}
.q-row{display:grid;grid-template-columns:1fr auto auto auto;gap:.5rem;align-items:center;padding:.45rem 0;border-bottom:1px solid var(--surface2);font-size:.78rem}
.q-row:last-child{border-bottom:none}
.q-label{color:var(--text);font-weight:600;line-height:1.3}
.q-answers{display:flex;gap:.35rem;align-items:center}
.q-ans{display:inline-flex;align-items:center;gap:.2rem;padding:.18rem .5rem;border-radius:6px;font-size:.72rem;font-weight:700;white-space:nowrap}
.q-ans.user{background:var(--primary-l);color:var(--primary-d);border:1px solid #c2e2da}
.q-ans.party{background:var(--surface2);color:var(--muted);border:1px solid var(--border)}
.q-match-icon{font-size:.9rem;flex-shrink:0}
.q-match-full .q-match-icon::after{content:"✓";color:#16a34a}
.q-match-half .q-match-icon::after{content:"~";color:#d97706}
.q-match-none .q-match-icon::after{content:"✗";color:#dc2626}
.q-ans-label{font-size:.7rem}

/* ── SECTION B: Theme Affinity ── */
.theme-bars{display:flex;flex-direction:column;gap:.7rem}
.theme-row{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:.85rem 1.1rem;box-shadow:var(--shadow-sm); cursor:pointer; user-select:none;}
.theme-row.open .party-detail { display: block; }
.theme-top{display:flex;align-items:baseline;justify-content:space-between;margin:0}
.theme-name{font-size:.82rem;font-weight:700;color:var(--text)}
.theme-best{font-size:.8rem;color:var(--text);text-align:right;max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.theme-track{height:8px;margin-top:8px;background:var(--surface2);border-radius:99px;overflow:hidden;border:1px solid var(--border)}
.theme-fill{height:100%;border-radius:99px;transition:width .8s ease}
.theme-party-select {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background-color: var(--surface);
  margin-left: 5px;
  outline: none;
  cursor: pointer;
}
.theme-party-select:hover { border-color: var(--primary); }

/* ── SECTION C: Map ── */
.chart-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:1.25rem 1rem 1rem;margin-bottom:1.25rem}
.chart-x-labels{display:flex;justify-content:space-between;font-size:.62rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:0 .15rem;margin-bottom:.4rem}
.chart-body{display:flex;gap:.5rem;align-items:center}
.chart-y-label{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.58rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.chart-wrap{flex:1;position:relative;min-height:420px}
#chart-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:420px;gap:1rem;color:var(--muted)}
.spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}

/* restart */
.btn-restart{display:block;margin:.5rem auto 0;width:fit-content;background:var(--surface);border:1.5px solid var(--border);border-radius:99px;color:var(--muted);cursor:pointer;font-family:var(--font-sans);font-size:.84rem;font-weight:700;padding:.65rem 1.75rem;transition:all var(--tr)}
.btn-restart:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-l)}

/* footer */
.site-footer{width:100%;border-top:1px solid var(--border);background:var(--surface2);padding:1.25rem 1.5rem;margin-top:3rem}
.footer-inner{max-width:700px;margin:0 auto;display:flex;flex-direction:column;gap:.55rem}
.footer-block{font-size:.68rem;line-height:1.6;color:var(--muted);opacity:.82}
.footer-block strong{font-weight:700}

/* animations */
@keyframes fadeDown{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:none}}
@keyframes fadeUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes slideOut{to{opacity:0;transform:translateX(-18px)}}
@keyframes slideIn{from{opacity:0;transform:translateX(18px)}}
@keyframes spin{to{transform:rotate(360deg)}}

@media(max-width:420px){
  .quiz-card{padding:1.4rem 1.1rem 1.2rem}
  .chart-y-label{display:none}
  .party-pct{font-size:1.2rem}
  .q-row{grid-template-columns:1fr auto}
  .q-answers{flex-direction:column;gap:.2rem;align-items:flex-end}
}
/* ════════════════════════════════════════════
   APPENDERE IN FONDO A style.css
   ════════════════════════════════════════════ */

/* ── BANNER EX-AEQUO ── */
.exaequo-banner {
  background: linear-gradient(135deg, #fef9ec, #fef3c7);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: .65rem 1rem;
  font-size: .82rem;
  color: #92400e;
  margin-bottom: .75rem;
}
.exaequo-banner strong { font-weight: 800; }

/* ── PODIO ANIMATO ─────────────────────────── */


.podium-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem 0 0;
  margin-bottom: 1.5rem;
}

/* Ogni slot: logo + nome + % + barra */
.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 175px;
  /* ANIMAZIONE: parte trasparente e spostata in basso */
  opacity: 0;
  transform: translateY(36px);
  animation: podiumRise .55s cubic-bezier(.22,.68,0,1.2) forwards;
}
@keyframes podiumRise {
  to { opacity: 1; transform: translateY(0); }
}

/* Logo circolare */
.podium-logo-wrap {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  overflow: hidden;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .45rem;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.pos-1 .podium-logo-wrap { width: 68px; height: 68px; border-width: 3px; }
.podium-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* Nome partito (max 2 righe) */
.podium-name {
  font-size: .72rem; font-weight: 700;
  color: var(--text); text-align: center;
  margin-bottom: .2rem; line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;           /* ← aggiunta questa */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-1 .podium-name { font-size: .78rem; }

/* Percentuale */
.podium-pct {
  font-family: var(--font-sans);
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: .5rem;
}
.pos-1 .podium-pct { font-size: 1.35rem; }

/* Barre colorate: altezze diverse per 1°/2°/3° */
.podium-bar {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: .55rem;
}
.podium-rank {
  font-size: .82rem; font-weight: 800;
  color: rgba(255,255,255,.9);
  font-family: var(--font-sans);
}
/* Oro / Argento / Bronzo */
.bar-1 { height: 88px; background: linear-gradient(175deg,#c8951a,#e8b84b); }
.bar-2 { height: 60px; background: linear-gradient(175deg,#7a8fa0,#a8bece); }
.bar-3 { height: 44px; background: linear-gradient(175deg,#9a6640,#c08858); }

/* Responsive */
@media (max-width:420px) {
  .podium-logo-wrap { width: 44px; height: 44px; }
  .pos-1 .podium-logo-wrap { width: 56px; height: 56px; }
  .podium-pct { font-size: .95rem; }
  .pos-1 .podium-pct { font-size: 1.1rem; }
  .bar-1 { height: 70px; }
  .bar-2 { height: 50px; }
  .bar-3 { height: 36px; }
}

/* ─── SITE NAV (fixed, global) ─────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.nav-inner {
  max-width: 700px; margin: 0 auto; height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; gap: .5rem;
  box-sizing: border-box; width: 100%;
}
.nav-brand {
  font-family: var(--font-sans); font-size: 1.05rem; font-weight: 900;
  color: var(--primary); background: none; border: none; cursor: pointer;
  padding: 0; letter-spacing: -.01em; flex-shrink: 0;
  transition: color var(--tr);
}
.nav-brand:hover { color: var(--primary-d); }
.nav-end { display: flex; align-items: center; gap: .4rem; }
.nav-auth-guest, .nav-auth-user { display: flex; align-items: center; gap: .35rem; }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); object-fit: cover; flex-shrink: 0;
}
.nav-user-name {
  font-size: .75rem; font-weight: 700; color: var(--text);
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-btn {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 99px; color: var(--muted); cursor: pointer;
  font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
  padding: .26rem .72rem; transition: all var(--tr);
  white-space: nowrap; line-height: 1.4;
}
.nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.nav-btn-accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.nav-btn-accent:hover { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }
.nav-dark-btn {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 99px; cursor: pointer; font-size: .72rem; font-weight: 700;
  padding: .26rem .72rem; color: var(--muted); transition: all var(--tr);
  white-space: nowrap; font-family: var(--font-sans); line-height: 1.4;
}
.nav-dark-btn:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 480px) {
  .nav-inner { padding: 0 .85rem; gap: .35rem; }
  .nav-end { gap: .3rem; }
  .nav-auth-guest, .nav-auth-user { gap: .25rem; }
  .nav-user-name { display: none; }
  .nav-btn, .nav-dark-btn { font-size: .68rem; padding: .22rem .52rem; }
}
@media (max-width: 400px) {
  .nav-inner { padding: 0 .65rem; gap: .25rem; }
  .nav-end { gap: .22rem; }
  .nav-auth-user { gap: .18rem; }
  .nav-avatar { width: 24px; height: 24px; }
  .nav-btn, .nav-dark-btn { font-size: .63rem; padding: .2rem .42rem; }
  .nav-dark-btn { font-size: .6rem; padding: .2rem .38rem; }
}
@media (max-width: 340px) {
  .nav-btn-logout-nav { display: none; }
}

/* ─── DARK THEME VARIABLES ─────────────────── */
body.dark-theme {
  --bg: #18120e; --surface: #221a14; --surface2: #2a2018;
  --border: #3a2e24; --text: #ede6dc; --muted: #8a7e74;
  --primary: #e0684e;
  --primary-l: #2d1008;
  --primary-d: #f07a60;
  --card-bg: #221a14; --text-muted: #8a7e74;
  --shadow: 0 4px 24px rgba(0,0,0,.55), 0 1px 4px rgba(0,0,0,.3);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.42);
}
body.dark-theme .top-band {
  background: linear-gradient(90deg,#007a38,#444 50%,#a02030);
}
body.dark-theme .site-nav {
  box-shadow: 0 1px 8px rgba(0,0,0,.4);
}
body.dark-theme .exaequo-banner {
  background: #2a2000; border-color: #6b5000; color: #f0c060;
}
body.dark-theme .footer-block { opacity: .75; }
body.dark-theme .answer-btn[data-m="1"]:hover:not(:disabled),
body.dark-theme .answer-btn[data-m="0.5"]:hover:not(:disabled) {
  border-color: #4ade80;
  background: #052e16;
}
body.dark-theme .answer-btn[data-m="0"]:hover:not(:disabled) {
  border-color: #64748b;
  background: #1c2535;
}
body.dark-theme .answer-btn[data-m="-0.5"]:hover:not(:disabled),
body.dark-theme .answer-btn[data-m="-1"]:hover:not(:disabled) {
  border-color: #ef4444;
  background: #2d1515;
}
/* Dark mode: answer button icon badges */
body.dark-theme .answer-btn[data-m="1"]    .btn-icon { background: #052e16; color: #4ade80; }
body.dark-theme .answer-btn[data-m="0.5"]  .btn-icon { background: #052e16; color: #34d399; }
body.dark-theme .answer-btn[data-m="0"]    .btn-icon { background: #1e293b; color: #94a3b8; }
body.dark-theme .answer-btn[data-m="-0.5"] .btn-icon { background: #3d0a0a; color: #f87171; }
body.dark-theme .answer-btn[data-m="-1"]   .btn-icon { background: #3d0a0a; color: #fca5a5; }
/* Dark mode: user answer pill border */
body.dark-theme .q-ans.user { border-color: #1a4a3a; }
/* Dark mode: pro/con column boxes and heads */
body.dark-theme .procon-col-pro { background: #042417; border-color: #064e3b; border-left-color: #10b981; }
body.dark-theme .procon-col-con { background: #200808; border-color: #7f1d1d; border-left-color: #ef4444; }
body.dark-theme .procon-col-pro .procon-col-head { color: #34d399; }
body.dark-theme .procon-col-con .procon-col-head { color: #f87171; }
body.dark-theme .procon-col-text { color: var(--muted); }

/* ─── ANSWER SELECTED STATE ───────────────── */
.answer-btn.selected { background: #1a1410; color: #f4ede1; border-color: transparent; }
.answer-btn.selected .btn-icon { background: #fff; color: #1a1410; }
body.dark-theme .answer-btn.selected { background: #f4ede1; color: #1a1410; border-color: transparent; }
body.dark-theme .answer-btn.selected .btn-icon { background: #1a1410; color: #f4ede1; }

/* ─── SKIP BUTTON ──────────────────────────── */
.skip-btn {
  grid-column: 1 / -1;
  background: transparent; border: 1.5px dashed var(--border);
  border-radius: 11px; color: var(--muted); cursor: pointer;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 600;
  padding: .6rem 1.1rem; text-align: center; width: 100%;
  margin-top: .2rem; transition: border-color var(--tr), color var(--tr);
}
.skip-btn:hover:not(:disabled) { border-color: var(--muted); color: var(--text); }
.skip-btn:disabled { opacity: .4; cursor: not-allowed; }

/* q-row per domanda saltata */
.q-match-skip .q-match-icon::after { content: "–"; color: #94a3b8; }
.q-match-skip .q-ans.user { background: var(--surface2); color: var(--muted); border-color: var(--border); }

/* ─── ARCHETYPE BANNER ─────────────────────── */
#archetype-banner {
  background: linear-gradient(135deg, var(--primary-l), var(--surface));
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.35rem 1.6rem;
  margin-bottom: 2rem;
  animation: fadeUp .5s ease both;
}
.archetype-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .45rem;
}
.archetype-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 5vw, 2.1rem);
  font-weight: 400; font-style: italic;
  color: var(--text); line-height: 1.2; margin-bottom: .5rem;
}
.archetype-desc {
  font-size: .875rem; color: var(--muted); line-height: 1.65;
}

/* ─── RADAR CHART ──────────────────────────── */
.radar-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .1rem .8rem;
}
.radar-nav-btn {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.radar-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: scale(1.08);
}
.radar-nav-btn:disabled { opacity: .28; cursor: default; }
.radar-nav-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.radar-nav-party {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s;
}
.radar-nav-meta {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .15rem;
}

.radar-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: .5rem 0 .75rem;
}


/* ── SHARE SECTION ─────────────────────────── */
.share-section {
  display: flex; flex-direction: column; align-items: center;
  gap: .85rem; margin-bottom: 1.75rem;
}
.share-row-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.share-icons-row { display: flex; gap: 1.1rem; align-items: center; }
.sib {
  width: 52px; height: 52px; border-radius: 50%;
  border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s;
  flex-shrink: 0;
}
.sib svg { width: 22px; height: 22px; display: block; }
.sib:hover  { transform: translateY(-3px); }
.sib:active { transform: scale(.9); }
.sib:disabled { opacity: .42; cursor: not-allowed; transform: none !important; filter: none !important; }
.sib-wa { background: #25D366; box-shadow: 0 2px 14px rgba(37,211,102,.38); }
.sib-wa:hover  { box-shadow: 0 6px 24px rgba(37,211,102,.55); }
.sib-fb { background: #1877F2; box-shadow: 0 2px 14px rgba(24,119,242,.38); }
.sib-fb:hover  { box-shadow: 0 6px 24px rgba(24,119,242,.55); }
.sib-x  { background: #0f0f0f; box-shadow: 0 2px 14px rgba(0,0,0,.28); }
.sib-x:hover   { box-shadow: 0 6px 24px rgba(0,0,0,.45); background: #000; }
.sib-ig {
  background: linear-gradient(135deg,#f09433 0%,#e6683c 20%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
  box-shadow: 0 2px 14px rgba(220,39,67,.38);
}
.sib-ig:hover  { box-shadow: 0 6px 24px rgba(220,39,67,.55); filter: brightness(1.09); }

/* ── FRIEND AFFINITY CARD ───────────────────── */
#friend-card {
  background: linear-gradient(135deg, #eff6ff, var(--surface));
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  animation: fadeUp .5s ease both;
}
body.dark-theme #friend-card {
  background: linear-gradient(135deg, #0a1628, var(--surface));
  border-color: #1e3a5f;
  border-left-color: #3b82f6;
}
.friend-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #3b82f6;
  margin-bottom: .5rem;
}
.friend-pct {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: .35rem;
}
.friend-sub {
  font-size: .82rem;
  color: var(--muted);
}

/* ── SOCIAL SHARE CAPTURE (off-screen) ──────── */
#share-capture {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 500px;
  padding: 1.5rem;
  background: #f2f1ed;
  pointer-events: none;
}
body.dark-theme #share-capture { background: #1c1c1b; }
.sc-brand {
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: .85rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid var(--border);
}
/* cloned archetype banner inside capture */
.sc-arc-clone {
  background: linear-gradient(135deg, var(--primary-l), var(--surface));
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.35rem 1.6rem;
}

/* ── TOAST ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1917;
  color: #e5e7eb;
  padding: .65rem 1.4rem;
  border-radius: 99px;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-sans);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  z-index: 1000;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── AUTH BAR ────────────────────────────────────── */
.auth-bar {
  margin-bottom: 1.25rem;
  animation: fadeDown .4s ease both;
}
.auth-privacy-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .9rem;
  margin-bottom: .6rem;
}
.privacy-check {
  width: 15px; height: 15px;
  flex-shrink: 0; margin-top: 2px;
  accent-color: var(--primary); cursor: pointer;
}
.privacy-label {
  font-size: .78rem; color: var(--muted); line-height: 1.5; cursor: pointer;
}
.link-btn {
  background: none; border: none;
  color: var(--primary); cursor: pointer;
  font-size: inherit; font-family: inherit;
  padding: 0; text-decoration: underline;
}
.btn-login {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem; width: 100%;
  background: #fff; border: 1.5px solid #dadce0;
  border-radius: 99px; color: #3c4043;
  cursor: pointer; font-family: var(--font-sans);
  font-size: .84rem; font-weight: 700;
  padding: .7rem 1.4rem; transition: all var(--tr);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.btn-login:hover:not(:disabled) { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.btn-login:disabled { opacity: .45; cursor: not-allowed; }
.auth-user {
  align-items: center; gap: .7rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: .65rem 1rem; flex-wrap: wrap;
}
.auth-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0; object-fit: cover;
}
.auth-name {
  font-size: .84rem; font-weight: 700; color: var(--text);
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.btn-auth-secondary {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 99px; color: var(--muted); cursor: pointer;
  font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
  padding: .28rem .8rem; transition: all var(--tr); white-space: nowrap;
}
.btn-auth-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ── CARD SHARE ROW ──────────────────────────── */
.share-card-row { display: flex; gap: .6rem; width: 100%; max-width: 340px; }
.btn-download-card,
.btn-share-card {
  flex: 1; border-radius: 99px; cursor: pointer;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 700;
  padding: .6rem 1rem; transition: all var(--tr);
  white-space: nowrap; text-align: center;
}
.btn-download-card {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--muted);
}
.btn-download-card:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-share-card {
  background: var(--primary); border: 1.5px solid var(--primary); color: #fff;
}
.btn-share-card:hover:not(:disabled) { background: var(--primary-d); border-color: var(--primary-d); transform: translateY(-1px); }
.btn-download-card:disabled,
.btn-share-card:disabled { opacity: .65; cursor: not-allowed; }

/* ── PROFILE MODAL ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  z-index: 500; display: flex; align-items: center;
  justify-content: center; padding: 1rem; animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal-box {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  width: 100%; max-width: 500px; max-height: 82vh;
  display: flex; flex-direction: column; animation: fadeUp .22s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 1.1rem; color: var(--muted);
  cursor: pointer; padding: .25rem .45rem; border-radius: 6px;
  transition: color var(--tr), background var(--tr); line-height: 1;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-body { overflow-y: auto; padding: 1rem 1.4rem 1.5rem; flex: 1; }
.modal-loading { display: flex; justify-content: center; padding: 2.5rem; }
.modal-empty {
  text-align: center; color: var(--muted);
  font-size: .88rem; padding: 2rem 0; line-height: 1.6;
}
.history-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: .85rem 1rem; margin-bottom: .6rem;
}
.history-date { font-size: .7rem; color: var(--muted); margin-bottom: .3rem; }
.history-archetype {
  font-family: var(--font-sans); font-size: .92rem;
  font-weight: 700; font-style: italic; color: var(--text); margin-bottom: .45rem;
}
.history-parties { display: flex; gap: .45rem; flex-wrap: wrap; }
.history-parties span {
  font-size: .7rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 99px;
  padding: .15rem .6rem; color: var(--muted);
}
.history-parties strong { color: var(--primary-d); font-weight: 800; }
.btn-replay-history {
  display: block; width: 100%; margin-top: .55rem;
  background: var(--primary-l); border: 1px solid var(--primary);
  border-radius: 8px; color: var(--primary-d);
  cursor: pointer; font-family: var(--font-sans);
  font-size: .75rem; font-weight: 700; padding: .38rem .75rem;
  text-align: left; transition: all var(--tr);
}
.btn-replay-history:hover { background: var(--primary); color: #fff; }

/* ══════════════════════════════════════════════════════════
   SOCIAL SHARE CARD — Wrapped redesign
   Dark full-bleed · Massive archetype · Party bars · 360×640
   ══════════════════════════════════════════════════════════ */
#social-card-export {
  position: fixed; left: -9999px; top: 0;
  width: 360px; height: 640px; overflow: hidden;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d0b09 0%, #131110 100%);
  font-family: 'Figtree', 'Manrope', system-ui, sans-serif;
  pointer-events: none; color: #f0e8dc;
  --sce-accent: #a8311e;
}

/* ── Brand strip ── */
.sce-topbar {
  display: flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem .5rem;
  flex-shrink: 0; position: relative; z-index: 2;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sce-topbar .sce-brand-mark {
  width: 34px; height: 20px; border-radius: 4px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; padding: 2px 3px;
}
.sce-topbar .sce-brand {
  font-size: .72rem; font-weight: 800;
  letter-spacing: .03em; color: rgba(255,255,255,.78);
}
.sce-topbar-tag {
  margin-left: auto;
  font-size: .48rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.28);
}

/* ── Hero: archetype fills upper space ── */
.sce-hero {
  flex: 1;
  padding: .9rem .95rem .85rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; z-index: 2; min-height: 0;
}
.sce-profile-kicker {
  font-size: .42rem; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.38); margin-bottom: .6rem; flex-shrink: 0;
}
.sce-archetype-display {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.5rem; font-weight: 700; font-style: italic;
  color: #fff; line-height: 1.04;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 40px rgba(0,0,0,.5);
}

/* ── Data panel — enlarged for readability ── */
.sce-data-panel {
  flex-shrink: 0;
  padding: .75rem .95rem .65rem;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.42);
  display: flex; flex-direction: column; gap: .6rem;
}

/* Parties */
.sce-parties-row {
  display: flex; gap: 0; align-items: flex-start;
}
.sce-parties-col { flex: 1; min-width: 0; }
.sce-parties-sep {
  width: 1px; background: rgba(255,255,255,.08);
  align-self: stretch; flex-shrink: 0; margin: 0 .5rem;
}
.sce-dp-label {
  font-size: .52rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.36);
  margin-bottom: .42rem;
}
.sce-parties { display: flex; flex-direction: column; gap: .36rem; }
.sce-party-row { display: flex; align-items: center; gap: .28rem; }
.sce-medal {
  font-size: .55rem; font-weight: 800; color: rgba(255,255,255,.28);
  width: 10px; flex-shrink: 0; text-align: right;
  font-variant-numeric: tabular-nums;
}
.sce-logo {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); object-fit: cover;
  flex-shrink: 0; background: rgba(255,255,255,.1);
}
.sce-logo-initial {
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .32rem; font-weight: 900; color: #fff; flex-shrink: 0;
}
.sce-party-mid { flex: 1; min-width: 0; }
.sce-party-name {
  font-size: .6rem; font-weight: 700; color: rgba(255,255,255,.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; margin-bottom: 3px;
}
.sce-party-bar-track {
  height: 3.5px; background: rgba(255,255,255,.1);
  border-radius: 99px; overflow: hidden;
}
.sce-party-bar-fill { height: 100%; border-radius: 99px; }
.sce-party-pct {
  font-size: .7rem; font-weight: 800; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Area leaders */
.sce-areas-compact {
  padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sce-area-leaders {
  display: grid; grid-template-columns: 1fr 1fr; gap: .07rem .32rem;
}
.sce-area-leader-row { display: flex; align-items: center; gap: .22rem; }
.sce-al-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.sce-al-area {
  font-size: .48rem; font-weight: 600; color: rgba(255,255,255,.36);
  flex-shrink: 0; white-space: nowrap; width: 38px;
  overflow: hidden; text-overflow: ellipsis;
}
.sce-al-party {
  flex: 1; font-size: .52rem; font-weight: 700;
  color: rgba(255,255,255,.78);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sce-al-pct { font-size: .46rem; font-weight: 700; color: rgba(255,255,255,.36); flex-shrink: 0; }

/* ── Category quiz card variant ── */
.sce-cat-sublabel {
  display: block;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: .5rem; font-weight: 700; font-style: normal;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.48); margin-bottom: .55rem;
}
/* Category card hero: name in center instead of bottom */
#social-card-export.sce-cat-card .sce-hero {
  justify-content: center;
  text-align: center;
  padding-left: 1.4rem; padding-right: 1.4rem;
}
#social-card-export.sce-cat-card .sce-archetype-display {
  font-size: 3rem; /* larger since it's a shorter word */
  letter-spacing: -0.035em;
}

/* Mini radar */
.sce-radar-mini {
  padding-top: .4rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sce-radar-wrap { height: 58px; position: relative; width: 100%; }

/* Footer */
.sce-card-footer {
  padding: .26rem .95rem;
  background: rgba(0,0,0,.55);
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .4rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.18);
  flex-shrink: 0; text-align: center;
}

/* ── FRIEND COMPARISON RADAR ─────────────────── */
.friend-radar-wrap {
  position: relative;
  margin-top: 1.1rem;
  max-width: 400px;
  margin-left: auto; margin-right: auto;
}

/* ══════════════════════════════════════════════
   DASHBOARD (Profilo Modal)
   ══════════════════════════════════════════════ */

/* Wider modal box for dashboard */
#profile-modal .modal-box {
  max-width: 640px;
  max-height: 90vh;
}

/* ── Tabs ── */
.dash-tabs {
  display: flex;
  gap: .3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .65rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.dash-tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 700;
  padding: .35rem .9rem; border-radius: 99px;
  color: var(--muted); transition: all var(--tr);
}
.dash-tab:hover { background: var(--surface2); color: var(--text); }
.dash-tab.active { background: var(--primary); color: #fff; }

/* ── Panel ── */
.dash-panel { animation: fadeUp .25s ease both; }

/* ── Section headings inside dashboard ── */
.dash-section-title {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  margin: 1rem 0 .5rem;
}

/* ── Archetype banner in dashboard ── */
.dash-archetype-banner {
  background: linear-gradient(135deg, var(--primary-l), var(--surface));
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .5rem;
}

/* ── Top Parties list ── */
.dash-parties-list { display: flex; flex-direction: column; gap: .3rem; }
.dash-party-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem .65rem;
  background: var(--surface2);
  border-radius: 8px;
}
.dash-medal { font-size: .85rem; width: 20px; flex-shrink: 0; }
.dash-party-name { flex: 1; font-size: .82rem; font-weight: 600; color: var(--text); }
.dash-party-pct {
  font-family: var(--font-sans);
  font-size: .92rem; font-weight: 700;
}

/* ── Priority list ── */
.dash-priority-list { display: flex; flex-direction: column; gap: .3rem; }
.dash-priority-item {
  display: flex; align-items: flex-start; gap: .5rem; padding: .25rem 0;
}
.dash-priority-badge {
  font-size: .54rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: .15rem .5rem;
  border-radius: 99px; flex-shrink: 0; margin-top: 2px; color: #fff;
}
.dash-priority-text {
  font-size: .78rem; color: var(--text); line-height: 1.4;
}

/* ── Radar in dashboard ── */
.dash-radar-wrap {
  position: relative;
  max-width: 360px;
  margin: .25rem auto 0;
}

/* ── Network tab ── */
.dash-network-empty {
  text-align: center; padding: 2.25rem 1rem; color: var(--muted);
}
.dash-network-icon { font-size: 2.4rem; margin-bottom: .6rem; }
.dash-network-count {
  font-size: .82rem; font-weight: 700; color: var(--primary);
  padding: .4rem 0 .8rem;
}

/* ── RADAR AXIS ? ICON OVERLAYS ───────────────── */

/* Wrapper: absolutely placed over the canvas, centered on its own point.
   Does NOT use .rl-tipwrap to avoid the position:relative override. */
.rx-icon-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
}
/* Show tooltip on hover or when toggled open */
.rx-icon-wrap:hover .rl-tip,
.rx-icon-wrap.open  .rl-tip {
  opacity: 1;
  pointer-events: auto;
}

/* ? button (also used by .rl-tipwrap inline legend) */
.rl-tipwrap { position: relative; }
.rl-qbtn {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  color: var(--muted);
  font-size: .68rem; font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.rl-qbtn:hover, .rl-tipwrap.open .rl-qbtn {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb, 37,99,235),.08);
}

/* Tooltip popup */
.rl-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: .7rem .85rem .65rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.13);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
  z-index: 100;
  text-align: left;
}
.rl-tipwrap:hover .rl-tip,
.rl-tipwrap.open   .rl-tip {
  opacity: 1;
  pointer-events: auto;
}
.rl-tip-area {
  font-size: .78rem; font-weight: 700;
  color: var(--primary, #2563eb);
  margin-bottom: .35rem;
}
.rl-tip-body {
  font-size: .72rem; color: var(--muted);
  margin-bottom: .5rem;
  line-height: 1.45;
}
.rl-tip-row {
  display: flex; gap: .5rem; align-items: baseline;
  font-size: .7rem; color: var(--text);
  line-height: 1.4;
  margin-top: .25rem;
}
.rl-tip-lo {
  font-size: .62rem; font-weight: 700;
  background: #fee2e2; color: #dc2626;
  border-radius: 4px; padding: 1px 5px;
  flex-shrink: 0;
}
.rl-tip-hi {
  font-size: .62rem; font-weight: 700;
  background: #dcfce7; color: #16a34a;
  border-radius: 4px; padding: 1px 5px;
  flex-shrink: 0;
}
/* Dark theme overrides */
.dark-theme .rl-tip {
  background: #23211e;
  border-color: #3a3830;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.dark-theme .rl-tip-lo { background: #4a1c1c; color: #fca5a5; }
.dark-theme .rl-tip-hi { background: #14391f; color: #86efac; }

/* ── PRO / CON EDUCATIONAL SECTION ─────────────── */
#procon-section { margin-bottom: 1.25rem; }

.procon-wrap { border: none; }

/* Summary toggle — always hidden, content always visible */
.procon-toggle {
  display: flex; align-items: center; gap: .45rem; cursor: pointer;
  font-family: var(--font-sans); font-size: .78rem; font-weight: 700;
  color: var(--muted); background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: 9px;
  padding: .45rem .75rem; margin-bottom: .55rem;
  list-style: none; transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.procon-toggle::-webkit-details-marker { display: none; }
.procon-toggle::marker { display: none; }
.procon-toggle:hover { color: var(--text); border-color: var(--primary); }
.procon-arrow {
  margin-left: auto; font-size: .9rem; font-weight: 700;
  color: var(--muted); transition: transform .2s ease;
}
.procon-wrap[open] .procon-arrow { transform: rotate(90deg); }

/* Two-column grid */
.procon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

/* Each box */
.procon-box {
  border-radius: 10px; padding: .65rem .8rem;
}
.procon-pro {
  background: #e3f0e7; border: 1px solid #b2d9c0;
}
.procon-con {
  background: #fbe6dd; border: 1px solid #f0c4ac;
}
.procon-head {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .62rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; margin-bottom: .45rem;
  padding: .22rem .65rem; border-radius: 99px;
}
.procon-pro .procon-head { background: #2d7a4f; color: #fff; }
.procon-con .procon-head { background: #c04230; color: #fff; }
.procon-text { font-size: .78rem; color: var(--muted); line-height: 1.55; margin: 0; }

/* Dark mode */
body.dark-theme .procon-pro {
  background: #042417; border-color: #064e3b;
}
body.dark-theme .procon-con {
  background: #200808; border-color: #7f1d1d;
}
body.dark-theme .procon-pro .procon-head { background: #2d7a4f; color: #fff; }
body.dark-theme .procon-con .procon-head { background: #c04230; color: #fff; }

.procon-toggle { display: none; }

/* Mobile (< 580px): procon stacked + answer cards more compact */
@media (max-width: 579px) {
  .procon-grid { grid-template-columns: 1fr; gap: .4rem; }
  .answers { gap: .3rem; }
  .answer-btn { padding: .8rem .25rem .65rem; gap: .4rem; }
  .btn-icon { width: 34px; height: 34px; font-size: .72rem; }
  .btn-label { font-size: .65rem; }
}

/* ── QUIZ BOTTOM NAV ────────────────────────────── */
#quiz-section .progress-top { display: none; }
#quiz-section .progress-track { display: none; }
#quiz-section #progress-dots { display: none; }

.quiz-bottom-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1rem; gap: .75rem;
}
.quiz-nav-back {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 99px;
  color: var(--text); cursor: pointer; font-family: var(--font-sans);
  font-size: .84rem; font-weight: 700; padding: .6rem 1.4rem;
  transition: border-color var(--tr), color var(--tr); white-space: nowrap;
}
.quiz-nav-back:hover { border-color: var(--primary); color: var(--primary); }
.quiz-nav-back.hidden { visibility: hidden; pointer-events: none; }
.quiz-nav-hint {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  flex: 1; text-align: center;
}
.quiz-nav-next {
  background: var(--text); color: var(--bg); border: none; border-radius: 99px;
  font-family: var(--font-sans); font-size: .84rem; font-weight: 700;
  padding: .6rem 1.4rem; cursor: pointer; transition: opacity var(--tr);
  white-space: nowrap;
}
.quiz-nav-next:hover { opacity: .82; }
@media (max-width: 479px) {
  .quiz-nav-hint { display: none; }
  .topic-banner { padding: .65rem 1rem .75rem; }
  .topic-banner-big { font-size: 1.2rem; }
  #question-text { font-size: clamp(1.4rem, 6vw, 1.9rem); }
}

/* ── UTILITY ────────────────────────────────────── */
.d-none { display: none; }
.chart-loading-text { font-size: .85rem; }
.theme-compare-label { font-size: .75rem; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; }
.dash-empty-muted { font-size: .78rem; color: var(--muted); padding: .15rem 0; }
.dash-empty-sm { font-size: .8rem; color: var(--muted); padding: .25rem 0; }
.dash-radar-placeholder { padding: .5rem 0; }
.dash-network-sub { font-size: .75rem; margin-top: .4rem; color: var(--muted); }
.history-registered { font-size: .68rem; color: var(--primary); margin-top: .2rem; }
.archetype-desc-sm { font-size: .8rem; margin-top: .35rem; }

/* ── HOMEPAGE QUIZ GRID ─────────────────────────────── */
.home-quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}
.hqc {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.2rem 1.1rem 1.1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(0,0,0,.08);
  background: var(--card-bg, #fff);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
  overflow: hidden;
}
.hqc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hqc-color, #1e3a8a);
  border-radius: 14px 14px 0 0;
}
.hqc:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  border-color: var(--hqc-color, #1e3a8a);
}
.hqc-top {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hqc-icon { font-size: 1.5rem; line-height: 1; }
.hqc-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  color: #fff;
  background: var(--hqc-color, #1e3a8a);
}
.hqc-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hqc-color, #1e3a8a);
  line-height: 1.2;
}
.hqc-meta {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hqc-desc {
  font-size: .82rem;
  color: var(--text-secondary, #555);
  line-height: 1.45;
}
.dark-theme .hqc {
  background: var(--card-bg);
  border-color: rgba(255,255,255,.08);
}
.dark-theme .hqc:hover { border-color: var(--hqc-color, #1e3a8a); }
.dark-theme .hqc-desc { color: var(--muted); }

/* ═══════════════════════════════════════════════════
   DIRECTION C — HOMEPAGE
   ═══════════════════════════════════════════════════ */

/* Full-width homepage layout */
body.home-page { padding-top: 52px; align-items: stretch; }
body.home-page .page { max-width: 100%; padding: 0; }

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  align-items: center;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 2.5rem 1.25rem 2rem; }
  .hero-cover { display: none; }
}
.hero-left { padding-right: 2.5rem; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 1rem;
}
.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 400; line-height: 1.12;
  letter-spacing: -.01em; color: var(--text);
  margin-bottom: 1.25rem;
}
.hero-heading em { font-style: italic; color: var(--primary); }
.hero-sub {
  font-size: 1rem; color: var(--muted);
  line-height: 1.7; max-width: 440px; margin-bottom: 2rem;
}
.hero-cta-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--primary); color: #fff;
  border: none; border-radius: 99px;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 700;
  padding: .8rem 1.8rem; cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  text-decoration: none; display: inline-block;
}
.btn-hero-primary:hover { background: var(--primary-d); transform: translateY(-1px); }
.btn-hero-secondary {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border); border-radius: 99px;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 600;
  padding: .8rem 1.8rem; cursor: pointer;
  transition: border-color var(--tr), color var(--tr);
  text-decoration: none; display: inline-block;
}
.btn-hero-secondary:hover { border-color: var(--primary); color: var(--primary); }
.hero-cover {
  width: 340px; height: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  overflow: hidden; position: relative;
}
.hero-cover-mark {
  font-family: var(--font-serif);
  font-size: 9rem; font-weight: 400; font-style: italic;
  color: var(--primary); opacity: .18; user-select: none;
  line-height: 1;
}
.hero-cover-label {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}

/* ── MODES SECTION (dark bg) ── */
.modes-section {
  background: #1a1208;
  padding: 3.5rem 2rem;
}
body.dark-theme .modes-section { background: #0e0b06; }
.modes-inner { max-width: 1100px; margin: 0 auto; }
.modes-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400; color: #f4ede1;
  margin-bottom: .5rem;
}
.modes-sub {
  font-size: .9rem; color: rgba(244,237,225,.55);
  margin-bottom: 2.5rem; line-height: 1.6;
}
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 680px) { .modes-grid { grid-template-columns: 1fr; } }
.mode-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 1.5rem 1.4rem 1.4rem;
  text-decoration: none;
  color: #f4ede1;
  display: flex; flex-direction: column; gap: .5rem;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
  position: relative; overflow: hidden;
}
.mode-card:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(168,49,30,.7);
  transform: translateY(-2px);
}
.mode-card-icon { font-size: 1.8rem; line-height: 1; margin-bottom: .2rem; }
.mode-card-name {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 400; line-height: 1.2;
}
.mode-card-meta {
  font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(244,237,225,.5);
}
.mode-card-desc { font-size: .83rem; color: rgba(244,237,225,.65); line-height: 1.5; }
.mode-card-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--primary); color: #fff;
  font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .18rem .55rem; border-radius: 99px;
}

/* ── HOME RADAR ── */
.home-radar-section {
  max-width: 860px; margin: 0 auto;
  padding: 4rem 2rem;
}
.home-radar-head { margin-bottom: 2rem; }
.home-radar-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; line-height: 1.15; margin: 0 0 .5rem;
}
.home-radar-heading em { font-style: normal; color: var(--primary); }
.home-radar-sub { color: var(--text-muted); font-size: .95rem; max-width: 520px; margin: 0; }
.home-radar-card {
  background: var(--card-bg); border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border: 1px solid var(--border);
  padding: 2rem;
}
.home-radar-canvas-wrap {
  position: relative; max-width: 540px; margin: 0 auto;
}
.home-radar-canvas-wrap canvas { display: block; width: 100% !important; }
.hr-blurred canvas { filter: blur(10px); pointer-events: none; }
.home-radar-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; text-align: center; padding: 1.5rem;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(2px);
  border-radius: 12px;
}
body.dark-theme .home-radar-overlay { background: rgba(0,0,0,.1); }
.home-radar-lock-icon { font-size: 2.2rem; }
.home-radar-lock-msg { font-size: .88rem; color: var(--text-muted); max-width: 220px; margin: 0; }
.home-radar-login-btn {
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-size: .85rem; font-weight: 600; padding: .45rem 1.1rem;
}
.home-radar-login-btn:hover { opacity: .88; }
.hr-overlay-btn {
  display: inline-block; background: var(--primary); color: #fff;
  border-radius: 8px; font-size: .85rem; font-weight: 600; padding: .45rem 1.1rem;
  text-decoration: none;
}
.hr-overlay-btn:hover { opacity: .88; }
.home-radar-caption {
  margin: 1.2rem 0 0; font-size: .85rem; color: var(--text-muted); text-align: center;
}
.hr-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.hr-link:hover { text-decoration: underline; }
.home-radar-party-sel { margin-top: 1.4rem; }
.home-radar-compare-label {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); margin: 0 0 .7rem;
}
.home-radar-party-btns {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.hr-party-btn {
  font-size: .78rem; font-weight: 600; padding: .3rem .8rem;
  border-radius: 99px; cursor: pointer;
  border: 1.5px solid var(--hr-clr, #999);
  background: transparent; color: var(--text);
  transition: background .15s, color .15s;
}
.hr-party-btn:hover, .hr-party-btn.active {
  background: var(--hr-clr, #999); color: #fff;
}
@media (max-width: 600px) {
  .home-radar-section { padding: 2.5rem 1.25rem; }
  .home-radar-card { padding: 1.25rem; }
}

/* ── TOPIC GRID ── */
.topics-section {
  max-width: 1100px; margin: 0 auto;
  padding: 3.5rem 2rem;
}
.topics-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400; margin-bottom: .5rem;
}
.topics-sub {
  font-size: .9rem; color: var(--muted);
  margin-bottom: 2rem; line-height: 1.6;
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
}
.topic-card {
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1.25rem 1.15rem 1.1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(0,0,0,.07);
  background: var(--surface);
  text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative; overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tc-color, var(--primary));
  border-radius: 14px 14px 0 0;
}
.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  border-color: var(--tc-color, var(--primary));
}
.topic-icon { font-size: 1.4rem; line-height: 1; }
.topic-name {
  font-size: .98rem; font-weight: 700;
  color: var(--tc-color, var(--primary)); line-height: 1.2;
}
.topic-meta {
  font-size: .7rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.topic-desc { font-size: .8rem; color: var(--muted); line-height: 1.45; }
body.dark-theme .topic-card { background: var(--surface); border-color: rgba(255,255,255,.07); }
body.dark-theme .topic-card:hover { border-color: var(--tc-color, var(--primary)); }

/* ── COMPARE SECTION ── */
.compare-section {
  background: var(--c-diritti);
  padding: 3rem 2rem;
}
.compare-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.compare-text { flex: 1; min-width: 220px; }
.compare-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400; color: #fff; margin-bottom: .5rem;
}
.compare-sub { font-size: .9rem; color: rgba(255,255,255,.72); line-height: 1.6; }
.btn-compare {
  background: #fff; color: var(--c-diritti);
  border: none; border-radius: 99px;
  font-family: var(--font-sans); font-size: .88rem; font-weight: 700;
  padding: .75rem 1.75rem; cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  text-decoration: none; display: inline-block; white-space: nowrap;
}
.btn-compare:hover { background: #f0e0e5; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════
   DIRECTION C — QUIZ (topic banner + progress dots)
   ═══════════════════════════════════════════════════ */

/* Progress dots bar */
.progress-dots {
  display: flex; gap: 3px; align-items: center;
  margin-bottom: .4rem; flex-wrap: nowrap; overflow: hidden;
}
.progress-dot {
  flex: 1; height: 4px; border-radius: 99px;
  background: var(--border);
  transition: background .3s ease;
  min-width: 4px;
}
.progress-dot.answered { background: var(--dot-color, var(--primary)); }
.progress-dot.current  { background: var(--dot-color, var(--primary)); opacity: .5; }

/* Updated nav for quiz page */
.nav-prog-label {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .06em; color: var(--muted);
}
.nav-exit-btn {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 99px; color: var(--muted); cursor: pointer;
  font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
  padding: .26rem .72rem; transition: all var(--tr); white-space: nowrap;
}
.nav-exit-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Topic banner (full-width colored strip above card) */
.topic-banner {
  width: 100%; padding: .8rem 1.5rem 1rem;
  display: flex; align-items: center; gap: 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--banner-color, var(--primary));
  color: #fff;
}
.topic-banner-left { display: flex; flex-direction: column; gap: .18rem; }
.topic-banner-cat {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; opacity: .72;
}
.topic-banner-big {
  font-family: var(--font-serif); font-size: 1.55rem; font-weight: 400;
  line-height: 1.1; color: #fff;
}
.topic-banner-prog {
  margin-left: auto; display: flex; gap: 5px; align-items: center;
  flex-wrap: nowrap; overflow: hidden; flex-shrink: 1;
}
.tbd { flex: 1; height: 3px; border-radius: 99px; min-width: 4px; max-width: 20px;
  background: rgba(255,255,255,.25); }
.tbd.tbd-done { background: rgba(255,255,255,.9); }
.tbd.tbd-cur { background: rgba(255,255,255,.55); }
.quiz-card.with-banner {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}
.quiz-card-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}

/* ═══════════════════════════════════════════════════
   DESIGN v2 — QUIZ ICON FONT
   ═══════════════════════════════════════════════════ */
.btn-icon {
  font-family: var(--font-serif);
  font-size: 1.375rem;
}
.answer-btn[data-m="1"]   .btn-icon,
.answer-btn[data-m="-1"]  .btn-icon { font-size: 1rem; }

/* ═══════════════════════════════════════════════════
   DESIGN v2 — HOMEPAGE (body.home-page scope)
   ═══════════════════════════════════════════════════ */

/* Nav brand — logo only, no text */
.home-brand {
  text-decoration: none;
  background: none; border: none; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center;
  /* currentColor feeds the SVG black paths */
  color: #191818;
  transition: opacity .2s;
}
.home-brand:hover { opacity: .76; }
body.dark-theme .home-brand { color: #F0E8DC; } /* cream: P+M paths */

/* Inline SVG logo */
.nav-logo-img {
  height: 28px; width: auto; display: block; flex-shrink: 0;
}
@media (max-width: 480px) { .nav-logo-img { height: 22px; } }

/* nav-brand-text: always hidden (logo only) */
.nav-brand-text { display: none; }
.home-brand em { font-style: italic; color: var(--primary); }

.home-nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: .82rem; font-weight: 600; color: var(--text);
}
.home-nav-links a { color: inherit; text-decoration: none; transition: color var(--tr); }
.home-nav-links a:hover { color: var(--primary); }
@media (max-width: 700px) {
  .home-nav-links {
    gap: 16px !important;
    font-size: .74rem !important;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }
  .home-nav-links::-webkit-scrollbar { display: none; }
  .home-nav-links a { white-space: nowrap; }
  .home-nav-links a::after { display: none !important; }
}

/* Hero overrides */
body.home-page .hero {
  grid-template-columns: 1.5fr 1fr;
  max-width: 1240px; padding: 56px 56px 56px;
  align-items: end; gap: 56px;
}
body.home-page .hero-eyebrow {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--primary);
  margin-bottom: 1rem;
}
body.home-page .hero-heading {
  font-size: clamp(2.4rem, 5.5vw, 5.5rem);
  line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 1.75rem;
}
body.home-page .hero-heading em { font-style: italic; color: inherit; }
body.home-page .hero-sub { font-size: 1.1rem; max-width: 540px; margin-bottom: 2rem; }
body.home-page .btn-hero-primary { display: inline-flex; align-items: center; gap: .9rem; }
.btn-hero-meta {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  opacity: .7; letter-spacing: .04em;
}
.hero-cta-alt { font-size: .82rem; color: var(--muted); }

/* Hero cover — solid dark panel */
body.home-page .hero-cover {
  width: auto; height: auto; aspect-ratio: 3 / 4;
  background: var(--text); border: none; border-radius: 0; box-shadow: none;
  display: block; padding: 0; position: relative; overflow: hidden;
}
.hero-cover-top {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: #f4ede1; opacity: .7; position: relative; z-index: 2;
}
.hero-cover-mark-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
body.home-page .hero-cover-mark {
  position: static; transform: none;
  font-family: var(--font-serif);
  font-size: clamp(10rem, 22vw, 20rem);
  font-weight: 400; font-style: italic;
  color: var(--primary); opacity: .95;
  letter-spacing: -0.06em; line-height: 0.8;
  user-select: none; text-align: center;
}
.hero-cover-quote {
  position: relative; z-index: 2;
  font-family: var(--font-serif);
  font-size: clamp(.95rem, 1.8vw, 1.3rem);
  color: #f4ede1; letter-spacing: -0.01em; line-height: 1.25;
}
.hero-qt { font-style: italic; color: var(--primary); }

@media (max-width: 760px) {
  body.home-page .hero { grid-template-columns: 1fr; padding: 2.5rem 1.25rem 2rem; gap: 2rem; }
  body.home-page .hero-cover { aspect-ratio: 4 / 3; }
}

/* Modes section overrides */
body.home-page .modes-section { padding: 64px 0; }
body.home-page .modes-inner { max-width: 1240px; }
.modes-head { margin-bottom: 36px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.2); }
.modes-kicker {
  font-family: var(--font-sans); font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem;
}
body.home-page .modes-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.025em; color: #f4ede1; margin: 0;
}
body.home-page .modes-heading em { font-style: italic; }
body.home-page .modes-sub { display: none; }
body.home-page .modes-grid { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 680px) { body.home-page .modes-grid { grid-template-columns: 1fr; } }

.mode-card {
  display: flex; flex-direction: column; gap: 18px;
  padding: 32px 28px; border-radius: 4px;
  text-decoration: none; color: inherit;
  transition: opacity var(--tr), transform var(--tr);
}
.mode-card:hover { opacity: .88; transform: translateY(-2px); }
.mode-card-primary { background: #f4ede1; color: #1a1410; padding: 36px 32px; }
.mode-card-dark {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); color: #f4ede1;
}
.mode-tag {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border-radius: 999px; background: var(--mtag, #a8311e); color: #fff;
  font-family: var(--font-sans); font-size: .65rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; width: fit-content;
}
.mode-num {
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  line-height: 0.95; letter-spacing: -0.04em;
  display: flex; align-items: baseline; gap: .3rem;
}
.mode-dom {
  font-family: var(--font-sans); font-style: normal;
  font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; opacity: .38;
  align-self: flex-end; margin-bottom: .35rem;
}
.mode-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.mode-meta {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .06em; opacity: .6; margin-top: -10px;
}
.mode-desc { font-size: .875rem; line-height: 1.55; opacity: .75; flex: 1; margin: 0; }
.mode-cta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; font-size: .82rem; font-weight: 600;
  border-top: 1px solid rgba(255,255,255,.15);
}
.mode-card-primary .mode-cta { border-top-color: rgba(26,20,16,.1); }
.mode-arrow { font-size: 1.1rem; }

/* Topics section overrides */
body.home-page .topics-section { max-width: 1240px; padding: 64px 56px; }
.topics-head { margin-bottom: 36px; padding-bottom: 16px; border-bottom: 2px solid var(--text); }
.topics-kicker {
  font-family: var(--font-sans); font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--primary); margin-bottom: .5rem;
}
body.home-page .topics-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.025em; margin: 0;
}
body.home-page .topics-heading em { font-style: italic; }
body.home-page .topics-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { body.home-page .topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { body.home-page .topics-grid { grid-template-columns: 1fr; } }

body.home-page .topic-card {
  padding: 22px; border-radius: 4px;
  border: 1px solid rgba(26,20,16,.07);
  background: #fff; gap: 10px; min-height: 200px;
}
body.home-page .topic-card::before { border-radius: 4px 4px 0 0; height: 6px; }
body.home-page .topic-icon { display: none; }
body.home-page .topic-meta { display: none; }

.topic-card-head {
  display: flex; justify-content: space-between; align-items: center; margin-top: 6px;
}
.topic-num {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--tc-color, var(--primary));
}
.topic-qmeta {
  font-family: var(--font-mono); font-size: .58rem; font-weight: 600;
  letter-spacing: .08em; color: var(--muted); opacity: .7;
}
body.home-page .topic-name {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 400; line-height: 1.05; letter-spacing: -0.015em;
  color: var(--text); margin-top: 2px;
}
body.home-page .topic-desc { font-size: .8rem; line-height: 1.45; color: var(--muted); flex: 1; }
.topic-cta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid rgba(26,20,16,.08);
  font-size: .75rem; font-weight: 600; color: var(--text);
}
.topic-arr { font-size: 1.05rem; color: var(--tc-color, var(--primary)); }
@media (max-width: 560px) { body.home-page .topics-section { padding: 2.5rem 1.25rem; } }

/* Compare section overrides */
body.home-page .compare-section { padding: 64px 0; }
body.home-page .compare-inner { max-width: 1240px; padding: 0 56px; display: block; }
.compare-kicker {
  font-family: var(--font-sans); font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: 1rem;
}
body.home-page .compare-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.03em;
  margin: 0 0 18px; max-width: 700px;
}
body.home-page .compare-heading em { font-style: italic; }
body.home-page .compare-sub { max-width: 520px; font-size: 1rem; line-height: 1.6; }

/* ── AMICI SECTION ──────────────────────────────────── */
.amici-section {
  padding: 5rem 0 4rem; background: var(--surface);
  border-top: 1px solid var(--border);
}
.amici-head {
  max-width: 600px; margin: 0 auto 2.5rem; text-align: center; padding: 0 1.5rem;
}
.amici-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; letter-spacing: -0.03em; margin: 0 0 .6rem;
}
.amici-heading em { font-style: italic; color: var(--primary); }
.amici-sub { color: var(--muted); font-size: .95rem; margin: 0; line-height: 1.6; }

/* Guest + loading */
.amici-guest { max-width: 400px; margin: 0 auto; text-align: center; padding: 2.5rem 1.5rem; }
.amici-guest-icon { font-size: 3rem; margin-bottom: 1rem; }
.amici-guest-text { color: var(--muted); font-size: .95rem; margin: 0 0 1.2rem; }
.amici-guest-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 10px;
  padding: .65rem 1.4rem; font-size: .95rem; font-weight: 700; cursor: pointer;
}
.amici-guest-btn:hover { opacity: .88; }
.amici-loading-state { display: flex; justify-content: center; padding: 4rem 0; }

/* Content layout */
.amici-content { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Invite bar */
.amici-invite-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 14px; padding: .95rem 1.2rem; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.amici-invite-info { display: flex; align-items: center; gap: .85rem; min-width: 0; flex: 1; }
.amici-invite-icon { font-size: 1.2rem; flex-shrink: 0; }
.amici-invite-label {
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: .1rem;
}
.amici-invite-url {
  font-size: .78rem; color: var(--primary); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 480px;
}
.amici-invite-btn {
  flex-shrink: 0; background: var(--primary); color: #fff; border: none;
  border-radius: 9px; padding: .5rem 1.1rem; font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.amici-invite-btn:hover { opacity: .88; }

/* Two-column grid */
.amici-cols {
  display: grid; grid-template-columns: 340px 1fr; gap: 1.25rem; align-items: start;
}

/* Shared col chrome */
.amici-list-col, .amici-compare-col {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 16px; overflow: hidden;
}
.amici-col-head {
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.amici-col-title { font-size: .85rem; font-weight: 800; margin: 0; letter-spacing: .01em; }
.amici-count {
  font-size: .7rem; font-weight: 700; background: var(--surface2);
  border-radius: 99px; padding: .12rem .5rem; color: var(--muted);
}

/* Friends list */
.amici-list { display: flex; flex-direction: column; max-height: 480px; overflow-y: auto; }
.amici-empty-state {
  text-align: center; padding: 2.5rem 1.5rem; color: var(--muted);
}
.amici-empty-icon { font-size: 2.2rem; margin-bottom: .65rem; }
.amici-empty-state p { font-size: .85rem; margin: 0; line-height: 1.5; }

.amici-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1.2rem; border-bottom: 1px solid var(--border);
  cursor: default; transition: background .12s;
}
.amici-item:last-child { border-bottom: none; }
.amici-item.registered { cursor: pointer; }
.amici-item.registered:hover { background: var(--surface2); }
.amici-item.selected { background: var(--primary-l); }
.amici-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; flex-shrink: 0; letter-spacing: .02em;
}
.amici-item:not(.registered) .amici-avatar { background: var(--surface2); color: var(--muted); }
.amici-info { flex: 1; min-width: 0; }
.amici-item-arch {
  font-size: .84rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.amici-item-date { font-size: .7rem; color: var(--muted); }
.amici-reg { color: var(--primary); font-weight: 700; }
.amici-compare-btn {
  flex-shrink: 0; background: none; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: .7rem; font-weight: 700; cursor: pointer;
  padding: .22rem .6rem; color: var(--text); transition: border-color .12s, background .12s;
  font-family: var(--font-sans);
}
.amici-compare-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }

/* Compare panel */
.amici-compare-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3.5rem 2rem; color: var(--muted); min-height: 220px;
}
.amici-compare-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .6; }
.amici-compare-empty p { font-size: .88rem; margin: 0; max-width: 230px; line-height: 1.5; }
.amici-cmp-loading { display: flex; justify-content: center; padding: 3rem 0; }

.amici-compare-content { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

.amici-cmp-profiles { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .75rem; }
.amici-cmp-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 13px; padding: 1rem 1.1rem;
}
.amici-cmp-card.is-me { border-color: var(--primary); }
.amici-cmp-label {
  font-size: .62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: .5rem;
}
.amici-cmp-arch { font-size: .9rem; font-weight: 800; margin-bottom: .3rem; line-height: 1.25; }
.amici-cmp-pos { font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.amici-cmp-party { font-size: .82rem; font-weight: 700; }
.amici-cmp-party span { font-weight: 600; }
.amici-cmp-nodata { font-size: .82rem; color: var(--muted); }
.amici-cmp-vs {
  font-size: .68rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted); padding-top: 1.75rem; text-align: center;
}

/* Agreement bar */
.amici-cmp-agreement {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 13px; padding: 1.1rem 1.2rem; text-align: center;
}
.amici-cmp-agr-pct { font-size: 2.4rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: .15rem; }
.amici-cmp-agr-label { font-size: .78rem; color: var(--muted); margin-bottom: .85rem; }
.amici-cmp-agr-bar { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.amici-cmp-agr-fill { height: 100%; background: var(--primary); border-radius: 99px; }

/* Category rows in compare */
.amici-cmp-block {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 13px; padding: 1rem 1.1rem;
}
.amici-cmp-block-title {
  font-size: .67rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: .75rem;
}
.amici-cmp-cat-row {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem;
}
.amici-cmp-cat-row:last-child { margin-bottom: 0; }
.amici-cmp-cat-icon { font-size: 1rem; flex-shrink: 0; }
.amici-cmp-cat-name { font-size: .78rem; font-weight: 600; width: 110px; flex-shrink: 0; }
.amici-cmp-cat-bar { flex: 1; height: 5px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.amici-cmp-cat-fill { height: 100%; border-radius: 99px; }
.amici-cmp-cat-pct { font-size: .75rem; font-weight: 800; width: 32px; text-align: right; flex-shrink: 0; }

@media (max-width: 860px) {
  .amici-cols { grid-template-columns: 1fr; }
  .amici-list { max-height: 300px; }
}
@media (max-width: 600px) {
  .amici-invite-url { max-width: 180px; }
  .amici-cmp-profiles { grid-template-columns: 1fr; }
  .amici-cmp-vs { display: none; }
}

/* Home footer */
.home-footer {
  border-top: 2px solid var(--text); padding: 32px 56px;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1240px; margin: 0 auto;
}
@media (max-width: 680px) {
  .home-footer { flex-direction: column; gap: 1rem; padding: 24px 1.25rem; text-align: center; }
}
.home-footer-brand {
  font-family: var(--font-serif); font-size: 1.35rem; font-weight: 400;
  letter-spacing: -0.01em; color: var(--text);
}
.home-footer-brand em { font-style: italic; color: var(--primary); }
.home-footer-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right;
}
.home-footer-text {
  font-family: var(--font-mono); font-size: .63rem; font-weight: 500;
  letter-spacing: .1em; color: var(--muted); max-width: 480px; line-height: 1.5;
}
.home-footer-legal {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .06em; color: var(--muted); opacity: .7;
}
.home-footer-link {
  color: var(--muted); text-decoration: underline;
  text-underline-offset: 3px; transition: color .15s;
}
.home-footer-link:hover { color: var(--primary); }
@media (max-width: 680px) {
  .home-footer-right { align-items: center; text-align: center; }
}

/* ═══════════════════════════════════════════════════
   DESIGN v2 — QUIZ PAGE
   ═══════════════════════════════════════════════════ */

/* Hide old header above quiz — design starts at banner */
.header { display: none; }

/* Nav wordmark on quiz page */
.quiz-prog-label {
  font-family: var(--font-sans);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

/* Bigger question text — 56px at full width */
#question-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text); margin-bottom: 1.75rem;
}

/* Topic banner — larger, more generous */
.topic-banner {
  padding: 1.6rem 1.75rem 1.8rem;
  justify-content: space-between;
}
.topic-banner-cat {
  font-family: var(--font-mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; opacity: .8; margin-bottom: .4rem;
}
.topic-banner-big {
  font-family: var(--font-serif); font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 400; line-height: 1; color: #fff;
}

/* ═══════════════════════════════════════════════════
   DESIGN v2 — RESULTS PAGE
   ═══════════════════════════════════════════════════ */

/* Large results heading */
.results-main-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.03em;
  margin: 0 0 .6rem;
}
.results-main-heading em { font-style: italic; color: var(--primary); }

/* Archetype banner — upgrade to match design */
#archetype-banner {
  background: var(--surface);
  border: none;
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  padding: 2.25rem 2.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.archetype-title {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  line-height: 1; margin-bottom: .8rem;
}

/* Section kicker + heading — Design C style */
.section-kicker {
  font-family: var(--font-sans);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .4rem;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 .4rem;
}
.section-heading em { font-style: italic; }

/* Hide old section-title (replaced by kicker+heading) */
.section-title { display: none; }

@media (max-width: 479px) {
  #question-text { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .topic-banner { padding: .8rem 1rem .9rem; }
  .topic-banner-big { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════
   HERO COVER — PROFILE STATE (logged in) — redesign
   ═══════════════════════════════════════════════════ */

#hero-default-state {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; pointer-events: none;
}

.hero-cover-profile {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  padding: 22px 22px 20px; color: #f4ede1; overflow: hidden;
}
.hero-cover.profile-active .hero-cover-profile { display: flex; }
.hero-cover.profile-active #hero-default-state { display: none; }

/* Top bar: kicker + squircle avatar */
.hcp-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-shrink: 0;
}
.hcp-kicker {
  font-family: var(--font-mono); font-size: .48rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(244,237,225,.32);
}
.hcp-avatar {
  width: 26px; height: 26px;
  border-radius: 7px; /* squircle */
  background: rgba(168,49,30,.75);
  border: 1px solid rgba(244,237,225,.16);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: .58rem; font-weight: 800;
  letter-spacing: .02em; flex-shrink: 0;
}

/* Body: archetype as dominant element with left red bar */
.hcp-body {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center;
  padding-left: 13px;
  border-left: 2px solid #a8311e;
  margin-bottom: 0; gap: 0;
}
.hcp-label {
  font-family: var(--font-mono); font-size: .46rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #a8311e; margin-bottom: 9px;
}
.hcp-archetype {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight: 400; font-style: italic;
  line-height: 1.08; letter-spacing: -0.025em;
  color: #f4ede1; margin-bottom: 10px;
  text-wrap: balance;
}
.hcp-desc {
  font-family: var(--font-sans); font-size: .69rem; line-height: 1.55;
  color: rgba(244,237,225,.52); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stats: compact editorial data panel */
.hcp-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 16px 0 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(244,237,225,.09);
  flex-shrink: 0;
}
.hcp-stat {
  padding: 8px 9px; border-radius: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.hcp-stat-label {
  font-family: var(--font-mono); font-size: .41rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(244,237,225,.3); margin-bottom: 5px;
}
.hcp-stat-name {
  font-family: var(--font-serif); font-size: .9rem; font-weight: 400;
  line-height: 1.2; color: #f4ede1; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcp-stat-pct {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 400;
  color: #cf5a3e; margin-top: 3px; letter-spacing: -0.02em;
}

/* CTA: full-width with animated arrow */
.hcp-cta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(244,237,225,.09);
  text-decoration: none;
  font-family: var(--font-sans); font-size: .7rem; font-weight: 600;
  color: rgba(244,237,225,.55);
  transition: color .22s ease; flex-shrink: 0;
}
.hcp-cta:hover { color: rgba(244,237,225,.9); }
.hcp-cta-arrow {
  color: #cf5a3e; font-size: 1.05rem;
  transition: transform .28s cubic-bezier(.22,.68,0,1.4);
  display: inline-block;
}
.hcp-cta:hover .hcp-cta-arrow { transform: translateX(5px); }

/* ═══════════════════════════════════════════════════
   HOMEPAGE FIXES
   ═══════════════════════════════════════════════════ */

/* Profile button in nav */
.nav-profile-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: .78rem; font-weight: 600;
  transition: opacity var(--tr); flex-shrink: 0; vertical-align: middle;
}
.nav-profile-btn:hover { opacity: .75; }

/* hero-cta-alt: its own line below the CTA button */
body.home-page .hero-cta-row { margin-bottom: .6rem; }
.hero-cta-alt {
  display: block;
  font-size: .82rem; color: var(--muted); margin-top: .2rem;
}

/* Fix mode-card-primary hover — rgba background from generic rule bleeds through */
body.home-page .mode-card:hover { opacity: 1; transform: translateY(-3px); }
body.home-page .mode-card-primary:hover {
  background: #ede6d9;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
}
body.home-page .mode-card-dark:hover { background: rgba(255,255,255,.1); }

/* Hero cover — always dark ink, never inverted by dark-theme */
body.home-page .hero-cover { background: #1a1410 !important; }

/* ═══════════════════════════════════════════════════
   DARK MODE — HOMEPAGE
   ═══════════════════════════════════════════════════ */

/* Nav in dark mode */
body.dark-theme.home-page .site-nav { background: #110e0b; border-bottom-color: rgba(255,255,255,.08); }
/* home-brand dark color handled in logo section above */
body.dark-theme .home-nav-links { color: var(--text); }
body.dark-theme .home-nav-links a { color: var(--text); }

/* Hero */
body.dark-theme.home-page .hero-heading { color: var(--text); }
body.dark-theme.home-page .hero-sub { color: var(--muted); }
body.dark-theme.home-page .btn-hero-primary {
  background: #c44024; color: #fff;
}
body.dark-theme.home-page .btn-hero-primary:hover { background: #a8311e; }

/* Hero cover quote — always readable on dark panel */
body.dark-theme.home-page .hero-cover-quote { color: #f4ede1; }
body.dark-theme.home-page .hero-cover-mark { color: #c44024; }
body.dark-theme.home-page .hero-cover { outline: 1px solid rgba(255,255,255,.13); }

/* Mode section — kept dark, mode-card-primary needs inversion */
body.dark-theme .mode-card-primary {
  background: #2c1f14;
  color: #ede6dc;
}
body.dark-theme .mode-card-primary .mode-cta {
  border-top-color: rgba(237,230,220,.12);
}
body.dark-theme .mode-card-primary:hover {
  background: #3a2a1a;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
body.dark-theme .mode-tag { color: #fff; }

/* Topic cards */
body.dark-theme.home-page .topic-card {
  background: #221a14;
  border-color: rgba(255,255,255,.06);
}
body.dark-theme.home-page .topic-card::before { opacity: .9; }
body.dark-theme.home-page .topic-name { color: var(--text); }
body.dark-theme.home-page .topic-desc { color: var(--muted); }
body.dark-theme.home-page .topic-cta {
  color: var(--text);
  border-top-color: rgba(255,255,255,.1);
}

/* Compare section — stays colored, already fine */

/* Newsletter */
body.dark-theme .newsletter-heading { color: var(--text); }
body.dark-theme .newsletter-sub { color: var(--muted); }
body.dark-theme .newsletter-form {
  background: #221a14;
  border-color: rgba(255,255,255,.1);
}
body.dark-theme .newsletter-placeholder { color: var(--muted); }
body.dark-theme .newsletter-btn {
  background: var(--text); color: #1a1410;
}

/* Home footer */
body.dark-theme .home-footer { border-top-color: rgba(255,255,255,.15); }
body.dark-theme .home-footer-brand { color: var(--text); }
body.dark-theme .home-footer-text { color: var(--muted); }

/* ── MAP SECTION ── */
body.home-page .map-section {
  max-width: 1240px; margin: 0 auto; padding: 64px 56px;
}
.map-head {
  margin-bottom: 28px; padding-bottom: 16px;
  border-bottom: 2px solid var(--text);
}
.map-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400; line-height: 1; letter-spacing: -0.025em; margin: 0;
}
.map-heading em { font-style: italic; }
.map-sub {
  font-size: .85rem; color: var(--muted);
  margin-top: .5rem; line-height: 1.55;
}
.map-canvas-wrap {
  position: relative; width: 100%;
  aspect-ratio: 1;
  max-height: 560px;
  border-radius: 4px; overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
#party-map { display: block; width: 100%; height: 100%; }
.map-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.map-legend-item {
  display: flex; align-items: center; gap: 7px;
  font-size: .75rem; font-weight: 500;
}
.map-legend-dot {
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.map-legend-dot img { width: 100%; height: 100%; object-fit: contain; }
.map-legend-label { color: var(--text); line-height: 1.3; }
#map-tooltip {
  position: fixed; z-index: 9999;
  background: var(--text); color: var(--bg);
  padding: 5px 11px; border-radius: 6px;
  font-family: var(--font-sans); font-size: .78rem; font-weight: 600;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
body.dark-theme .map-head { border-bottom-color: rgba(255,255,255,.2); }
body.dark-theme .map-canvas-wrap { border-color: rgba(255,255,255,.1); }
body.dark-theme .map-legend { border-top-color: rgba(255,255,255,.1); }
body.dark-theme .map-legend-label { color: var(--text); }
body.dark-theme #map-tooltip { background: #f4ede1; color: #1a1510; }
@media (max-width: 560px) {
  body.home-page .map-section { padding: 2.5rem 1.25rem; }
  .map-legend { grid-template-columns: repeat(2, 1fr); }
}

/* ── PROFILO PAGE ── */
.profilo-page .profilo-main {
  max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem;
  min-height: 80vh;
}
.profilo-loading { display: flex; align-items: center; justify-content: center; padding: 6rem 0; }
.profilo-guest { text-align: center; padding: 5rem 1rem; }
.profilo-guest-icon { font-size: 3rem; margin-bottom: 1rem; }
.profilo-guest-title { font-size: 1.8rem; font-weight: 800; margin: 0 0 .5rem; }
.profilo-guest-sub { color: var(--text-muted); margin: 0 0 1.5rem; max-width: 380px; margin-left: auto; margin-right: auto; }
.profilo-guest-btn { background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: .65rem 1.4rem; font-size: .95rem; font-weight: 700; cursor: pointer; }
.profilo-guest-btn:hover { opacity: .88; }

/* Hero */
.pf-hero { margin-bottom: 2rem; }
.pf-hero-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.pf-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; flex-shrink: 0;
}
.pf-name { font-size: 1.6rem; font-weight: 800; margin: 0 0 .2rem; }
.pf-email { color: var(--text-muted); font-size: .9rem; margin: 0 0 .2rem; }
.pf-member-since { color: var(--text-muted); font-size: .8rem; margin: 0 0 .5rem; opacity: .75; }
.pf-archetype-badge {
  display: inline-block; background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; padding: .25rem .75rem;
  border-radius: 99px;
}
.pf-archetype-badge:empty { display: none; }

/* Stat cards */
.pf-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 2.5rem;
}
.pf-stat-card {
  background: var(--card-bg); border-radius: 14px; padding: 1.1rem 1.2rem;
  border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.pf-stat-label {
  font-size: .67rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem;
}
.pf-stat-value { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }

/* Sections */
.pf-section { margin-bottom: 3rem; }
.pf-section-head { margin-bottom: 1.2rem; }
.pf-section-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 .25rem; }
.pf-section-sub { color: var(--text-muted); font-size: .88rem; margin: 0; }

/* Temi list — modern row design */
.pf-section-title-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.pf-temi-count-badge {
  font-size: .75rem; font-weight: 700; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: .2rem .65rem;
}
.pf-temi-count-badge span { color: var(--primary); }

#pf-temi-grid {
  display: flex; flex-direction: column; gap: .5rem;
}
.pf-tema-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border-radius: 14px;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.pf-tema-row:hover { box-shadow: 0 3px 14px rgba(0,0,0,.07); border-color: var(--tc); }
.pf-tema-row.done { border-color: var(--tc); }
.pf-tema-icon-wrap {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--surface2); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; flex-shrink: 0;
  color: var(--tc, var(--primary));
}
.pf-tema-icon-wrap svg { width: 20px; height: 20px; flex-shrink: 0; }
.pf-tema-row.locked .pf-tema-icon-wrap { opacity: .55; }
.pf-tema-mid {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem;
}
.pf-tema-name { font-size: .9rem; font-weight: 700; }
.pf-tema-bar-track {
  height: 5px; background: var(--surface2); border-radius: 99px; overflow: hidden;
}
.pf-tema-bar-fill { height: 100%; border-radius: 99px; min-width: 0; }
.pf-tema-row.locked .pf-tema-bar-track { display: none; }
.pf-tema-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: .25rem; flex-shrink: 0; min-width: 58px; text-align: right;
}
.pf-tema-score { font-size: 1rem; font-weight: 800; }
.pf-tema-redo { font-size: .75rem; font-weight: 600; text-decoration: none; color: var(--primary); }
.pf-tema-start { font-size: .78rem; font-weight: 700; text-decoration: none; color: var(--tc); }
.pf-tema-redo:hover, .pf-tema-start:hover { opacity: .75; }

/* Bussola */
.pf-bussola-locked {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 2rem; text-align: center; color: var(--text-muted);
}
.pf-bussola-lock { font-size: 2rem; margin-bottom: .75rem; }
.pf-bussola-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pf-bussola-pos { text-align: center; font-size: .88rem; color: var(--text-muted); margin: .75rem 0 0; }
.pf-bussola-wrap .chart-wrap canvas { height: 420px !important; }
.pf-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.pf-link:hover { text-decoration: underline; }

/* History */
.pf-hist-group { margin-bottom: 2rem; }
.pf-hist-group-title { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-size: .75rem; }
.pf-hist-list { display: flex; flex-direction: column; gap: .75rem; }
.pf-history-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.2rem;
}
.pf-hist-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; gap: .5rem; flex-wrap: wrap; }
.pf-hist-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); padding: .15rem .5rem; border-radius: 99px; }
.pf-hist-date { font-size: .78rem; color: var(--text-muted); }
.pf-hist-archetype { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.pf-hist-pos { font-size: .85rem; color: var(--text-muted); margin-bottom: .3rem; }
.pf-hist-score { font-size: .85rem; color: var(--text-muted); margin-bottom: .3rem; }
.pf-hist-parties { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.pf-hist-party { font-size: .8rem; font-weight: 600; }
.pf-replay-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 8px;
  padding: .3rem .8rem; font-size: .8rem; font-weight: 600; cursor: pointer;
  color: var(--text); transition: border-color .15s, background .15s;
}
.pf-replay-btn:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }

/* Network */
.pf-network-count { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.pf-empty { color: var(--text-muted); font-size: .9rem; }
.pf-empty a { color: var(--primary); font-weight: 600; }

@media (max-width: 600px) {
  .profilo-page .profilo-main { padding: 1.5rem 1rem 3rem; }
  .pf-stats { grid-template-columns: repeat(2, 1fr); }
  .pf-tema-row { gap: .7rem; padding: .7rem .85rem; }
  .pf-tema-icon-wrap { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 10px; }
  .pf-bussola-wrap .chart-wrap canvas { height: 300px !important; }
}

/* ══════════════════════════════════════════════
   QUALITY UPGRADES — interactivity & polish
   ══════════════════════════════════════════════ */

/* Focus rings — explicit, accessible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible { border-radius: 6px; }
.answer-btn:focus-visible { border-radius: 12px; }

/* Active / pressed feedback on key interactive elements */
.btn-hero-primary:active,
.btn-confirm:active:not(:disabled),
.amici-guest-btn:active,
.amici-invite-btn:active,
.nav-btn:active,
.nav-dark-btn:active,
.quiz-nav-next:active,
.quiz-nav-back:active {
  transform: scale(.97) !important;
  transition: transform .08s ease !important;
}
.mode-card:active { transform: translateY(0) scale(.98) !important; }
.topic-card:active { transform: translateY(0) scale(.98) !important; }
.amici-item.registered:active { transform: scale(.99); }

/* Radar card — explicit background so --card-bg resolves */
.home-radar-card { background: var(--card-bg, var(--surface)); }

/* Map canvas — softer corners */
.map-canvas-wrap { border-radius: 8px; }

/* Amici avatar — micro scale on item hover */
.amici-avatar { transition: transform .14s cubic-bezier(.22,.68,0,1.4); }
.amici-item.registered:hover .amici-avatar { transform: scale(1.1); }

/* Topic cards — underline CTA on hover for clearer affordance */
body.home-page .topic-card:hover .topic-cta > span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--tc-color, var(--primary));
  text-underline-offset: 2px;
}

/* Mode cards — title picks up accent on hover */
.mode-card .mode-title { transition: color .2s; }
body.home-page .mode-card-dark:hover .mode-title { color: #fff; }
body.home-page .mode-card-primary:hover .mode-title { color: var(--primary); }

/* Hero cover — ambient radial glow behind the ? mark */
body.home-page .hero-cover-mark-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, rgba(168,49,30,.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Nav profile button — smoother interaction */
.nav-profile-btn { transition: opacity var(--tr), transform var(--tr); }
.nav-profile-btn:hover { opacity: .8; transform: scale(1.06); }
.nav-profile-btn:active { transform: scale(.94); }

/* Amici section — on dark theme, stronger separation */
body.dark-theme .amici-section { background: var(--surface2); }

/* Smooth underline on nav links */
.home-nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.home-nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--primary);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.home-nav-links a:hover::after { transform: scaleX(1); }
.home-nav-links a.nav-active { color: var(--primary) !important; }
.home-nav-links a.nav-active::after { transform: scaleX(1) !important; }

/* ══════════════════════════════════════════════════════════
   REDESIGN v3 — Anti-AI pattern overhaul
   Design read: Italian civic editorial · Dials 7 / 5 / 4
   ══════════════════════════════════════════════════════════ */

/* ── text-wrap on all major headings ── */
.hero-heading, .modes-heading, .topics-heading, .map-heading,
.home-radar-heading, .amici-heading, h1, h2 { text-wrap: balance; }
#question-text { text-wrap: pretty; }

/* ── Scroll-reveal system (IntersectionObserver adds .in-view) ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .72s cubic-bezier(.16,1,.3,1),
              transform .72s cubic-bezier(.16,1,.3,1);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ────────────────────────────────────────────────────────
   TOPIC GRID — editorial list (removes colored-border-card AI tell)
   ──────────────────────────────────────────────────────── */
body.home-page .topics-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0 !important;
}

body.home-page .topic-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 2rem 1.75rem !important;
  min-height: 0 !important;
  gap: .6rem !important;
  transition: background .18s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Left column: right divider */
body.home-page .topic-card:nth-child(odd) {
  border-right: 1px solid var(--border) !important;
}

/* Strip top color bar */
body.home-page .topic-card::before { content: none !important; }

/* Left accent reveal on hover */
body.home-page .topic-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tc-color, var(--primary));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .28s cubic-bezier(.22,.68,0,1.2);
}
body.home-page .topic-card:hover::after { transform: scaleY(1); }
body.home-page .topic-card:hover {
  background: var(--surface) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Neutralize quality-upgrades CTA underline */
body.home-page .topic-card:hover .topic-cta > span:first-child {
  text-decoration: none !important;
}

/* Number: italic serif in category color */
body.home-page .topic-num {
  font-family: var(--font-serif) !important;
  font-size: 1.05rem !important;
  font-style: italic !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--tc-color, var(--primary)) !important;
  opacity: 1 !important;
}

/* Topic name: big serif with reveal underline */
body.home-page .topic-name {
  font-family: var(--font-serif) !important;
  font-size: clamp(1.35rem, 2vw, 1.75rem) !important;
  font-weight: 400 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  text-decoration: underline !important;
  text-decoration-color: transparent !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 1.5px !important;
  transition: text-decoration-color .2s !important;
}
body.home-page .topic-card:hover .topic-name {
  text-decoration-color: var(--tc-color, var(--primary)) !important;
}

body.home-page .topic-desc { font-size: .78rem !important; flex: 1 !important; }

body.home-page .topic-cta {
  border-top: none !important;
  padding-top: 0 !important;
  color: var(--tc-color, var(--primary)) !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
}

/* Dark mode overrides */
body.dark-theme.home-page .topic-card {
  border-bottom-color: rgba(255,255,255,.08) !important;
}
body.dark-theme.home-page .topic-card:nth-child(odd) {
  border-right-color: rgba(255,255,255,.08) !important;
}
body.dark-theme.home-page .topic-card:hover { background: #2a2018 !important; }

@media (max-width: 680px) {
  body.home-page .topics-grid { grid-template-columns: 1fr !important; }
  body.home-page .topic-card:nth-child(odd) { border-right: none !important; }
  body.home-page .topic-card { padding: 1.5rem 1.25rem !important; }
}

/* ────────────────────────────────────────────────────────
   MODE CARDS — bottom accent reveal + section grain
   ──────────────────────────────────────────────────────── */

/* Bottom border reveal on card hover */
body.home-page .mode-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: rgba(168,49,30,.75);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s cubic-bezier(.16,1,.3,1);
}
body.home-page .mode-card:hover::after { transform: scaleX(1); }
body.home-page .mode-card-primary::after { background: #a8311e; }

/* Section grain overlay */
body.home-page .modes-section { overflow: hidden; position: relative; }
body.home-page .modes-section::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}
body.home-page .modes-inner { position: relative; z-index: 1; }

/* ────────────────────────────────────────────────────────
   HERO — grain + breathing ? mark
   ──────────────────────────────────────────────────────── */

/* Grain overlay on dark panel */
body.home-page .hero-cover::before {
  content: '';
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none;
  mix-blend-mode: soft-light; opacity: .38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ? mark: slow breathe animation */
@keyframes markBreathe {
  0%, 100% { opacity: .95; }
  50%       { opacity: .68; }
}
body.home-page .hero-cover-mark {
  animation: markBreathe 5.5s ease-in-out infinite;
  filter: drop-shadow(0 0 100px rgba(168,49,30,.42));
}

/* ────────────────────────────────────────────────────────
   SECTION CONSISTENCY — radar + map widths match 1240px
   ──────────────────────────────────────────────────────── */

body.home-page .home-radar-section {
  max-width: 1240px !important;
  padding: 64px 56px !important;
}
body.home-page .home-radar-head {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}
@media (max-width: 560px) {
  body.home-page .home-radar-section { padding: 2.5rem 1.25rem !important; }
}

/* ── Map: crosshair cursor + legend interaction (hover + click) ── */
.map-canvas-wrap { cursor: crosshair; }
.map-legend-item {
  transition: opacity .18s;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.map-legend-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Hover: dim others on desktop */
.map-legend:not(.has-selection):hover .map-legend-item { opacity: .35; }
.map-legend:not(.has-selection):hover .map-legend-item:hover { opacity: 1; }

/* Click/touch selection: dim non-active */
.map-legend.has-selection .map-legend-item { opacity: .28; }
.map-legend.has-selection .map-legend-item.active { opacity: 1; }

/* Dark toggle: visual indicator of current mode via CSS */
body.dark-theme .nav-dark-btn::before { content: '◑ '; }
body:not(.dark-theme) .nav-dark-btn::before { content: '◐ '; }

/* ── Amici: consistent border ── */
.amici-section { border-top: 2px solid var(--border) !important; }

/* ── Footer ── */
.home-footer { max-width: 1240px; width: 100%; }
.home-footer-text { text-wrap: balance; }

/* ══════════════════════════════════════════════════════════
   TASTE SKILL — High-end graphical upgrade
   Vibe: Editorial Luxury · Haptic Depth · Spring Physics
   ══════════════════════════════════════════════════════════ */

/* ── Optical sizing: activate Source Serif 4 variable axis ── */
.hero-heading, .modes-heading, .topics-heading, .map-heading,
.home-radar-heading, .amici-heading, .section-heading,
.results-main-heading, .pf-section-title,
h1, h2 {
  font-optical-sizing: auto;
}

/* ── Spring physics easing: replace all transitions ── */
:root {
  --spring: cubic-bezier(.32,.72,0,1);
  --spring-out: cubic-bezier(.22,.68,0,1.2);
}
.topic-card, .mode-card, .btn-hero-primary, .btn-hero-secondary,
.nav-btn, .nav-dark-btn, .amici-invite-btn, .amici-guest-btn,
.quiz-nav-next, .quiz-nav-back, .filter-btn, .back-btn {
  transition-timing-function: var(--spring) !important;
}

/* Italian flag progress: handled by JS in home.js (universal support) */

/* ── Nav: elevated shadow on scroll ── */
.site-nav.scrolled {
  box-shadow: 0 4px 24px rgba(120,55,18,.14), 0 1px 4px rgba(0,0,0,.07);
  transition: box-shadow .4s var(--spring);
}

/* ── Hero: more dramatic at scale ── */
body.home-page .hero-heading {
  font-size: clamp(3rem, 8vw, 9rem) !important;
  letter-spacing: -0.04em !important;
  line-height: 0.93 !important;
}
body.home-page .hero-heading em { color: var(--primary); }

/* ? mark: fill the panel */
body.home-page .hero-cover-mark {
  font-size: clamp(14rem, 32vw, 28rem) !important;
  letter-spacing: -0.08em !important;
  line-height: 0.78 !important;
}

/* Hero CTA: nested pill for metadata */
body.home-page .btn-hero-primary {
  font-size: 1rem !important;
  padding: .9rem 1rem .9rem 1.85rem !important;
  gap: .85rem !important;
  border: 1.5px solid rgba(255,255,255,.18) !important;
  box-shadow: 0 4px 20px rgba(168,49,30,.3), inset 0 1px 0 rgba(255,255,255,.18) !important;
  transition: transform .3s var(--spring), background .3s var(--spring), box-shadow .3s var(--spring) !important;
}
body.home-page .btn-hero-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(168,49,30,.42), inset 0 1px 0 rgba(255,255,255,.18) !important;
}
.btn-hero-meta {
  background: rgba(0,0,0,.2) !important;
  border-radius: 99px !important;
  padding: .28rem .75rem !important;
  font-size: .65rem !important;
  letter-spacing: .08em !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Hero sub: wider, better prose */
body.home-page .hero-sub {
  font-size: 1.1rem !important;
  line-height: 1.72 !important;
  max-width: 46ch !important;
}

/* ── Section headings: editorial scale ── */
body.home-page .modes-heading {
  font-size: clamp(2.8rem, 5.5vw, 5rem) !important;
  letter-spacing: -0.035em !important;
  line-height: 0.95 !important;
}
body.home-page .topics-heading,
.map-heading,
body.home-page .home-radar-heading,
.amici-heading {
  font-size: clamp(2.4rem, 5vw, 4.5rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
}
.results-main-heading {
  font-size: clamp(2.5rem, 6vw, 5rem) !important;
  letter-spacing: -0.035em !important;
  line-height: 0.95 !important;
}
.section-heading {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
}

/* ── Mode numbers: fill the card vertically ── */
body.home-page .mode-num {
  font-size: clamp(5.5rem, 11vw, 10.5rem) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.05em !important;
}

/* Mode card primary: more impactful ── */
body.home-page .mode-card-primary {
  padding: 40px 36px !important;
}
body.home-page .mode-card {
  padding: 36px 30px !important;
}

/* ── Section spacing: generous breathing room ── */
body.home-page .map-section { padding-top: 80px !important; padding-bottom: 80px !important; }
body.home-page .home-radar-section { padding-top: 80px !important; padding-bottom: 80px !important; }
body.home-page .topics-section { padding-top: 80px !important; padding-bottom: 80px !important; }
body.home-page .modes-section { padding-top: 80px !important; padding-bottom: 80px !important; }
body.home-page .amici-section { padding-top: 80px !important; padding-bottom: 64px !important; }
body.home-page .hero { padding: 80px 56px 88px !important; }

@media (max-width: 760px) {
  body.home-page .hero { padding: 2.5rem 1.25rem 3rem !important; }
  body.home-page .map-section,
  body.home-page .home-radar-section,
  body.home-page .topics-section,
  body.home-page .modes-section,
  body.home-page .amici-section { padding: 3rem 1.25rem !important; }
}

/* ── Diffuse warm-tinted ambient shadows (premium feel) ── */
:root {
  --shadow: 0 4px 32px rgba(120,55,18,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-sm: 0 2px 10px rgba(120,55,18,.05);
}
body.dark-theme {
  --shadow: 0 4px 32px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.28);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.4);
}

/* ── Quiz question text: more presence ── */
#question-text {
  font-size: clamp(1.55rem, 3.2vw, 2.6rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.18 !important;
}

/* ── Archetype title in results: display scale ── */
.archetype-title {
  font-size: clamp(2rem, 5vw, 4rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
}

/* ── Amici section: more generous col heads ── */
.amici-col-title { font-size: 1rem !important; font-weight: 800 !important; }
.amici-cmp-agr-pct { font-size: 3rem !important; }

/* ── Profile page: bigger stat values ── */
.pf-name { font-size: 1.9rem !important; font-weight: 900 !important; }

/* ══════════════════════════════════════════════════════════
   UI/UX PRO MAX — Accessibility, touch targets, performance
   ══════════════════════════════════════════════════════════ */

/* Skip link (screen readers + keyboard nav) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-family: var(--font-sans);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* Touch targets: minimum 44px on small interactive elements */
.filter-btn,
.amici-compare-btn,
.back-btn,
.nav-exit-btn,
.hr-party-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pf-tema-redo, .pf-tema-start {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* Cursor pointer on all interactive non-button elements */
.map-legend-item,
.priority-item,
.theme-row,
.party-card-header,
.hqc,
.dash-tab,
.hr-party-btn,
.pf-tema-row.done,
.topic-card,
.mode-card { cursor: pointer; }

/* Prose line length cap */
.hero-sub, .archetype-desc, .map-sub, .home-radar-sub,
.amici-sub, .footer-block, .section-subtitle,
.pf-section-sub, .profilo-guest-sub { max-width: 65ch; }

/* Replace transition:all with specific properties */
.topic-card { transition-property: background, border-color, box-shadow !important; }
.mode-card  { transition-property: opacity, transform, background, border-color !important; }
.nav-btn, .nav-dark-btn, .filter-btn, .back-btn {
  transition-property: border-color, color, background !important;
}

/* Reduced motion: disable non-essential animations */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  body.home-page .hero-cover-mark { animation: none !important; opacity: .95 !important; }
  body.home-page .top-band { animation: none !important; }
  .topic-card::after, .mode-card::after,
  .home-nav-links a::after { transition: none !important; }
  .podium-slot { animation: none !important; opacity: 1 !important; transform: none !important; }
  .progress-fill { transition: none !important; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Better focus-visible ring */
:focus-visible {
  outline: 2.5px solid var(--primary) !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
}
button:focus-visible { border-radius: 8px !important; }
.answer-btn:focus-visible { border-radius: 12px !important; }
.topic-card:focus-visible { border-radius: 0 !important; outline-offset: -2px !important; }

/* Active / press feedback */
.btn-hero-primary:active,
.quiz-nav-next:active,
.btn-confirm:active,
.amici-guest-btn:active { transform: scale(.96) !important; }
.answer-btn:active:not(:disabled) { transform: scale(.97) !important; }
.filter-btn:active { transform: scale(.96); }

/* Disabled state: consistent */
button:disabled { opacity: .45 !important; cursor: not-allowed !important; transform: none !important; }

/* Decorative SVG: pointer events off */
.amici-guest-icon svg, .amici-empty-icon svg, .amici-compare-empty-icon svg,
.amici-invite-icon svg, .home-radar-lock-icon svg, .dash-network-icon svg,
.profilo-guest-icon svg, .pf-bussola-lock svg { pointer-events: none; }

/* Line height for readable body text */
body { line-height: 1.6; }
.archetype-desc, .footer-block, .pf-section-sub, .hero-sub { line-height: 1.72; }

/* Min readable font size on mobile */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .answer-btn .btn-label { font-size: .78rem; }
}

/* Image placeholder bg */
.party-logo-wrap img, .nav-avatar { background-color: var(--surface2); }

/* SVG icon containers ── */
.home-radar-lock-icon { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.home-radar-lock-icon svg { width: 28px; height: 28px; }
.amici-guest-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--muted); }
.amici-guest-icon svg { width: 40px; height: 40px; }
.amici-empty-icon { display: flex; align-items: center; justify-content: center; margin-bottom: .65rem; color: var(--muted); }
.amici-empty-icon svg { width: 32px; height: 32px; }
.amici-compare-empty-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--muted); opacity: .5; }
.amici-compare-empty-icon svg { width: 32px; height: 32px; }
.amici-invite-icon { display: flex; align-items: center; color: var(--muted); }
.amici-invite-icon svg { width: 18px; height: 18px; }
.dash-network-icon { display: flex; align-items: center; justify-content: center; margin-bottom: .6rem; color: var(--muted); }
.dash-network-icon svg { width: 32px; height: 32px; }
.profilo-guest-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--muted); }
.profilo-guest-icon svg { width: 36px; height: 36px; }
.pf-bussola-lock { display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; color: var(--muted); }
.pf-bussola-lock svg { width: 28px; height: 28px; }

/* ══════════════════════════════════════════════════════════
   QUIZ + RISULTATI — redesign
   ══════════════════════════════════════════════════════════ */

/* Results header: editorial border treatment */
#results-section .results-header {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}
.results-main-heading { text-wrap: balance; }
#results-section .results-header > p {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .55rem;
  line-height: 1.6;
}

/* Section heading: bigger, serif, editorial */
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: .5rem;
  text-wrap: balance;
}
.section-heading em { font-style: italic; }

/* Section kicker: hidden (banned per anti-AI rules) */
.section-kicker { display: none; }

/* Section subtitle: muted descriptor */
.section-subtitle {
  font-size: .8rem !important;
  color: var(--muted) !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.5;
  display: block !important;
}

/* Section blocks: editorial spacing with separators */
.section-block {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.section-block:last-of-type { border-bottom: none; }

/* Share section: cleaner visual treatment */
.share-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  gap: 1.1rem;
}
.share-row-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Archetype banner: text-wrap */
#archetype-banner { text-wrap: balance; }
.archetype-title { text-wrap: balance; }
.archetype-desc { text-wrap: pretty; }

/* Priority heading: text-wrap */
.priority-header h2 { text-wrap: balance; }

/* Quiz question: better weight/tracking */
#question-text {
  letter-spacing: -0.028em;
}

/* Answer buttons: uniform icon size */
.btn-icon {
  transition: transform .12s cubic-bezier(.22,.68,0,1.4);
}
.answer-btn:hover:not(:disabled) .btn-icon { transform: scale(1.12); }
.answer-btn.selected .btn-icon { transform: scale(1.08); }

/* Progress dots: thicker for readability */
.progress-dot { height: 5px; border-radius: 2px; }

/* Restart button: more visible */
.btn-restart {
  margin: 2.5rem auto 0;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* Dark mode results header */
body.dark-theme #results-section .results-header { border-bottom-color: rgba(255,255,255,.15); }
body.dark-theme .section-block { border-bottom-color: rgba(255,255,255,.08); }
body.dark-theme .share-section { border-color: rgba(255,255,255,.08); }

/* ══════════════════════════════════════════════════════════
   PROFILO PAGE — redesign
   ══════════════════════════════════════════════════════════ */

/* Page: max-width consistent with homepage */
.profilo-page .profilo-main { max-width: 900px; }

/* Hero: editorial bottom border */
.pf-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}

/* Avatar: squircle instead of circle */
.pf-avatar { border-radius: 16px; }

/* Stat cards: editorial rows (remove generic card box) */
.pf-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 0 2rem;
  border-top: 1px solid var(--border);
  margin-bottom: 3rem;
}
.pf-stat-card {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1rem 0 !important;
}
.pf-stat-label {
  font-size: .62rem !important;
  font-weight: 700 !important;
  letter-spacing: .11em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
  margin-bottom: .3rem !important;
}
.pf-stat-value {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

/* Section heads: match homepage editorial style */
.pf-section-head {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 1.75rem !important;
}
.pf-section-title {
  font-family: var(--font-serif) !important;
  font-size: clamp(1.5rem, 3vw, 2.2rem) !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
  line-height: 1 !important;
  text-wrap: balance !important;
  margin-bottom: 0 !important;
}
.pf-section-sub {
  margin-top: .45rem !important;
  font-size: .82rem !important;
  color: var(--muted) !important;
}

/* Temi count badge: refined */
.pf-temi-count-badge {
  font-size: .7rem;
  letter-spacing: .04em;
}

/* History cards: strip box, use separator pattern */
.pf-history-card {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 1.1rem 0 !important;
}
.pf-hist-list { gap: 0; }

/* Bussola container: tighter radius */
.pf-bussola-wrap { border-radius: 8px !important; }
.pf-bussola-locked { background: transparent !important; border-radius: 4px !important; }

/* Guest state: bigger icon, better spacing */
.profilo-guest { padding: 6rem 1rem; }
.profilo-guest-title { text-wrap: balance; }

/* Headings: text-wrap */
.pf-name, .profilo-guest-title { text-wrap: balance; }

/* Dark mode profilo */
body.dark-theme .pf-hero { border-bottom-color: rgba(255,255,255,.14); }
body.dark-theme .pf-stats { border-top-color: rgba(255,255,255,.08); }
body.dark-theme .pf-stat-card { border-bottom-color: rgba(255,255,255,.08) !important; }
body.dark-theme .pf-section-head { border-bottom-color: rgba(255,255,255,.14); }
body.dark-theme .pf-history-card { border-bottom-color: rgba(255,255,255,.07) !important; }

/* ══════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ══════════════════════════════════════════════════════════ */

.admin-page { padding-top: 52px; }
.admin-page .nav-inner { max-width: 1100px; }
.adm-nav-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); flex: 1; text-align: center;
}

.adm-loading { display: flex; justify-content: center; padding: 6rem 0; }

.adm-wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

/* Gate (login / no-access) */
.adm-gate {
  max-width: 420px; margin: 8rem auto; text-align: center; padding: 0 1.5rem;
}
.adm-gate-title {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 400;
  letter-spacing: -0.02em; margin: 0 0 .6rem;
}
.adm-gate-sub { color: var(--muted); font-size: .9rem; margin: 0 0 1.5rem; }
.adm-login-btn {
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: .7rem 1.6rem;
  font-size: .95rem; font-weight: 700; cursor: pointer;
}
.adm-login-btn:hover { opacity: .88; }

/* Header */
.adm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1.5rem; border-bottom: 2px solid var(--text); margin-bottom: 2rem;
}
.adm-title {
  font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400; letter-spacing: -0.025em; line-height: 1; margin: 0;
}
.adm-title em { font-style: italic; color: var(--primary); }
.adm-refresh {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .4rem 1rem; font-size: .8rem; font-weight: 700;
  cursor: pointer; color: var(--muted); font-family: var(--font-sans);
  transition: border-color .15s, color .15s;
}
.adm-refresh:hover { border-color: var(--primary); color: var(--primary); }

/* KPIs */
.adm-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.adm-kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem 1.3rem;
}
.adm-kpi-val {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 400;
  letter-spacing: -0.03em; line-height: 1; color: var(--primary);
  margin-bottom: .3rem;
}
.adm-kpi-lbl { font-size: .75rem; color: var(--muted); font-weight: 600; }

/* Cards */
.adm-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.adm-card-title {
  font-size: .82rem; font-weight: 800; margin-bottom: 1rem; color: var(--text);
}
.adm-card-meta { font-weight: 500; color: var(--muted); font-size: .75rem; }

/* Charts */
.adm-charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 640px) { .adm-charts-row { grid-template-columns: 1fr; } }
.adm-chart-wrap { height: 200px; }
.adm-chart-sm  { height: 180px; }

/* Archetype list */
.adm-arch-list { display: flex; flex-direction: column; gap: .4rem; }
.adm-arch-row { display: flex; align-items: center; gap: .75rem; }
.adm-arch-name {
  font-size: .78rem; font-weight: 600; width: 220px; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-arch-bar-wrap { flex: 1; height: 7px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.adm-arch-bar { height: 100%; background: var(--primary); border-radius: 99px; }
.adm-arch-count { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; min-width: 60px; text-align: right; }
.adm-arch-count span { font-weight: 500; }

/* Party list */
.adm-party-list { display: flex; flex-direction: column; gap: .25rem; }
.adm-party-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .35rem 0; position: relative;
}
.adm-party-rank { font-size: .72rem; font-weight: 800; color: var(--muted); width: 18px; flex-shrink: 0; }
.adm-party-bar-fill {
  position: absolute; left: 24px; top: 0; bottom: 0;
  border-radius: 3px; z-index: 0; transition: width .4s;
}
.adm-party-name { font-size: .82rem; font-weight: 600; flex: 1; position: relative; z-index: 1; padding-left: .4rem; }
.adm-party-count { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; position: relative; z-index: 1; }
.adm-party-count span { font-weight: 500; }

/* Recent list */
.adm-recent-list { display: flex; flex-direction: column; overflow-x: auto; }
.adm-recent-row {
  display: grid;
  grid-template-columns: 100px 80px 1fr 1fr 60px 100px;
  gap: .5rem; padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .75rem; align-items: center;
}
.adm-recent-row:last-child { border-bottom: none; }
.adm-recent-head { font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.adm-badge {
  font-size: .62rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 5px; background: var(--surface2); color: var(--muted); white-space: nowrap;
}
@media (max-width: 640px) {
  .adm-recent-row { grid-template-columns: 80px 70px 1fr 50px; }
  .adm-recent-row > span:nth-child(4),
  .adm-recent-row > span:nth-child(6) { display: none; }
  .adm-arch-name { width: 140px; }
}

/* ── Consent banner ── */
.consent-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  background: #1a1410; color: #f0e8dc;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1rem 1.75rem;
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.16,1,.3,1);
  font-family: var(--font-sans);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}
.consent-banner.consent-visible  { transform: translateY(0); }
.consent-banner.consent-hiding   { transform: translateY(100%); transition-duration: .3s; }

.consent-text {
  flex: 1; font-size: .82rem; line-height: 1.55; min-width: 220px;
  color: rgba(240,232,220,.85);
}
.consent-text strong {
  display: block; font-size: .88rem; font-weight: 800;
  color: #f0e8dc; margin-bottom: .25rem; letter-spacing: .01em;
}
.consent-btns { display: flex; gap: .6rem; flex-shrink: 0; }

.consent-accept {
  background: #a8311e; color: #fff; border: none;
  border-radius: 8px; padding: .52rem 1.25rem;
  font-size: .82rem; font-weight: 700; cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity .15s;
}
.consent-accept:hover { opacity: .88; }
.consent-accept:active { transform: scale(.97); }

.consent-decline {
  background: transparent; color: rgba(240,232,220,.65);
  border: 1.5px solid rgba(240,232,220,.2);
  border-radius: 8px; padding: .52rem 1.1rem;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-sans);
  transition: color .15s, border-color .15s;
}
.consent-decline:hover { color: #f0e8dc; border-color: rgba(240,232,220,.4); }

@media (max-width: 540px) {
  .consent-banner { padding: .9rem 1.1rem; gap: .85rem; }
  .consent-text { font-size: .78rem; }
  .consent-btns { width: 100%; }
  .consent-accept, .consent-decline { flex: 1; text-align: center; }
}

/* ══════════════════════════════════════════════════════════
   PAGINA METODOLOGIA
   ══════════════════════════════════════════════════════════ */
.metod-page { padding-top: 52px; }
.metod-main { padding: 0; }
.metod-wrap { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

.metod-header { padding-bottom: 2rem; border-bottom: 2px solid var(--text); margin-bottom: 3rem; }
.metod-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400; letter-spacing: -0.03em; line-height: 1;
  margin: 1rem 0 .75rem; text-wrap: balance;
}
.metod-intro { font-size: 1rem; color: var(--muted); line-height: 1.65; max-width: 58ch; margin: 0 0 .4rem; }
.metod-date  { font-size: .72rem; color: var(--muted); opacity: .65; font-family: var(--font-mono); }

.metod-section { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); }
.metod-section:last-child { border-bottom: none; }
.metod-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 1rem; text-wrap: balance;
}
.metod-section h2 em { font-style: italic; color: var(--primary); }
.metod-section p {
  font-size: .92rem; line-height: 1.72; color: var(--text);
  margin: 0 0 .85rem; max-width: 65ch;
}
.metod-section p:last-child { margin-bottom: 0; }

.metod-list {
  font-size: .88rem; line-height: 1.65; color: var(--text);
  padding-left: 1.25rem; margin: .5rem 0 .85rem; max-width: 62ch;
}
.metod-list li { margin-bottom: .4rem; }
.metod-list strong { font-weight: 700; }

/* Axes */
.metod-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
@media (max-width: 560px) { .metod-axes { grid-template-columns: 1fr; } }
.metod-axis {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.1rem;
}
.metod-axis-label { font-size: .78rem; font-weight: 800; margin-bottom: .4rem; }
.metod-axis-desc { font-size: .8rem; color: var(--muted); line-height: 1.55; }

/* Category pills */
.metod-cats { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1rem; }
.metod-cat {
  font-size: .75rem; font-weight: 700;
  padding: .28rem .75rem; border-radius: 99px;
  border: 1.5px solid var(--cc, var(--border));
  color: var(--cc, var(--muted));
  background: color-mix(in srgb, var(--cc, transparent) 8%, transparent);
}

/* Scale */
.metod-scale { display: flex; flex-direction: column; gap: .35rem; margin: .75rem 0 1rem; }
.metod-scale-item { display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.metod-scale-val {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 800;
  min-width: 36px; text-align: center;
  padding: .15rem .4rem; border-radius: 5px;
}
.metod-scale-val.pos      { background: #e3f0e7; color: #1a6b35; }
.metod-scale-val.pos-light { background: #f0f7f1; color: #2d7a4f; }
.metod-scale-val.neu      { background: var(--surface2); color: var(--muted); }
.metod-scale-val.neg-light { background: #fdf0ec; color: #8a2c14; }
.metod-scale-val.neg      { background: #fbe6dd; color: #8a2c14; }
body.dark-theme .metod-scale-val.pos       { background: #042417; color: #4ade80; }
body.dark-theme .metod-scale-val.pos-light { background: #052e16; color: #4ade80; }
body.dark-theme .metod-scale-val.neg       { background: #200808; color: #f87171; }
body.dark-theme .metod-scale-val.neg-light { background: #200808; color: #f87171; }

/* Formula */
.metod-formula {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: .75rem 1rem; margin: .75rem 0 1rem;
  overflow-x: auto;
}
.metod-formula code {
  font-family: var(--font-mono); font-size: .82rem;
  color: var(--primary); white-space: nowrap;
}

/* active nav link on partiti page */
.partiti-page .home-nav-links a.nav-active { color: var(--primary); }
.partiti-page .home-nav-links a.nav-active::after { transform: scaleX(1) !important; }

/* ══════════════════════════════════════════════════════════
   PAGINA PARTITI
   ══════════════════════════════════════════════════════════ */

.partiti-page { padding-top: 52px; }
.partiti-page .site-nav .nav-inner { max-width: 900px; }

.pt-loading { display: flex; justify-content: center; padding: 6rem 0; }

.pt-wrap {
  max-width: 860px; margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── List view ── */
.pt-list-head {
  padding: 2.5rem 0 2rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}
.pt-list-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400; line-height: 1;
  letter-spacing: -0.03em; margin: 0 0 .6rem;
  text-wrap: balance;
}
.pt-list-title em { font-style: italic; color: var(--primary); }
.pt-list-sub { color: var(--muted); font-size: .95rem; max-width: 56ch; margin: 0; }

.pt-list-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}
.pt-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }

.pt-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background .15s; position: relative;
  cursor: pointer;
}
.pt-card::before {
  content: ''; position: absolute; left: -1.5rem; top: 0; bottom: 0; width: 3px;
  background: var(--ptc, var(--primary));
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .22s cubic-bezier(.22,.68,0,1.2);
}
.pt-card:hover::before { transform: scaleY(1); }
.pt-card:hover { background: var(--surface); padding-left: .75rem; }
.pt-card-major .pt-card-name { font-weight: 600; }

.pt-card-logo {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pt-card-logo img, .pt-card-logo div {
  width: 30px !important; height: 30px !important;
  max-width: 30px !important; max-height: 30px !important;
  object-fit: cover; border-radius: 50%; display: block !important;
}
.pt-card-body { flex: 1; min-width: 0; }
.pt-card-name {
  font-size: .95rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-card-pos { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.pt-card-arr { color: var(--muted); flex-shrink: 0; transition: transform .2s, color .2s; }
.pt-card:hover .pt-card-arr { transform: translateX(4px); color: var(--ptc, var(--primary)); }

/* ── Detail view ── */
.pt-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 700; color: var(--muted);
  text-decoration: none; margin-bottom: 1.75rem;
  transition: color .15s;
}
.pt-back:hover { color: var(--primary); }

.pt-detail-head {
  display: flex; align-items: flex-start; gap: 1.4rem;
  padding-bottom: 2rem; border-bottom: 2px solid var(--text);
  margin-bottom: 3rem; flex-wrap: wrap;
}
.pt-detail-logo { flex-shrink: 0; }
.pt-detail-info { flex: 1; min-width: 200px; }
.pt-detail-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 400; letter-spacing: -0.025em;
  line-height: 1.05; margin: 0 0 .4rem;
  text-wrap: balance;
}
.pt-detail-pos { font-size: .92rem; color: var(--muted); margin-bottom: .6rem; }
.pt-detail-coords { display: flex; gap: 1rem; flex-wrap: wrap; }
.pt-coord {
  font-size: .75rem; font-weight: 500; color: var(--muted);
  background: var(--surface2); border-radius: 6px; padding: .2rem .6rem;
}
.pt-coord strong { color: var(--text); font-weight: 800; }

/* ── Sections ── */
.pt-section { margin-bottom: 3.5rem; }
.pt-section-head {
  padding-bottom: 16px; border-bottom: 2px solid var(--text);
  margin-bottom: 2rem;
}
.pt-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 400; letter-spacing: -0.02em; line-height: 1; margin: 0 0 .35rem;
  text-wrap: balance;
}
.pt-section-title em { font-style: italic; color: var(--primary); }
.pt-section-sub { font-size: .82rem; color: var(--muted); margin: 0; }

/* ── Category grid ── */
.pt-cats-grid { display: flex; flex-direction: column; gap: .6rem; }

.pt-cat-row {
  display: flex; align-items: center; gap: .85rem;
  background: var(--surface); border-radius: 12px;
  padding: .85rem 1rem; border: 1px solid var(--border);
}
.pt-cat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.1rem;
}
.pt-cat-icon svg { width: 18px; height: 18px; }
.pt-cat-mid { flex: 1; min-width: 0; }
.pt-cat-name { font-size: .82rem; font-weight: 700; margin-bottom: .45rem; color: var(--text); }

/* 5-segment bar */
.pt-seg-bar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px; margin-bottom: .35rem;
  align-items: flex-end; /* active segment taller, baseline-aligned */
}
.pt-seg {
  height: 8px; border-radius: 4px;
  background: var(--border);
  transition: background .18s, height .18s;
}
/* Active segment: uses --seg-c custom property, taller */
.pt-seg.active {
  height: 14px;
  background: var(--seg-c, #a8311e);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--seg-c, #a8311e) 40%, transparent);
}

/* Extreme labels below bar */
.pt-seg-ends {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--muted); font-weight: 600;
  line-height: 1.3; margin-top: .1rem;
}
.pt-seg-ends span:last-child { text-align: right; }

/* Badge: current position label */
.pt-cat-badge {
  font-size: .78rem; font-weight: 700;
  padding: .28rem .75rem; border-radius: 99px;
  white-space: nowrap; flex-shrink: 0; text-align: center;
  min-width: 88px; max-width: 140px; line-height: 1.4;
}

@media (max-width: 540px) {
  .pt-cat-row { gap: .6rem; padding: .75rem; }
  .pt-cat-badge { min-width: 0; font-size: .62rem; padding: .18rem .5rem; }
  .pt-cat-name { font-size: .78rem; }
  .pt-seg-ends { font-size: .52rem; }
}

/* ── Area + questions ── */
.pt-area { margin-bottom: 2.5rem; }
.pt-area-title {
  font-family: var(--font-sans); font-size: .65rem;
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ac, var(--primary)); margin-bottom: .75rem;
  padding-left: .75rem; border-left: 3px solid var(--ac, var(--primary));
}
.pt-q-list { display: flex; flex-direction: column; }
.pt-q-row {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border);
}
.pt-q-row:last-child { border-bottom: none; }
.pt-q-text { flex: 1; font-size: .85rem; line-height: 1.5; color: var(--text); }
.pt-q-ans {
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: .2rem .6rem; border-radius: 6px; flex-shrink: 0;
}
.pt-q-pos  { background: #e3f0e7; color: #1a6b35; }
.pt-q-neg  { background: #fbe6dd; color: #8a2c14; }
.pt-q-neu  { background: var(--surface2); color: var(--muted); }
.pt-q-skip { background: var(--surface2); color: var(--muted); opacity: .6; }

body.dark-theme .pt-q-pos { background: #042417; color: #4ade80; }
body.dark-theme .pt-q-neg { background: #200808; color: #f87171; }
body.dark-theme .pt-detail-head { border-bottom-color: rgba(255,255,255,.14); }
body.dark-theme .pt-section-head { border-bottom-color: rgba(255,255,255,.14); }
body.dark-theme .pt-list-head { border-bottom-color: rgba(255,255,255,.14); }
body.dark-theme .pt-list-title { color: var(--text); }
body.dark-theme .pt-card { color: var(--text); }
body.dark-theme .pt-card:hover { background: var(--surface2); }
body.dark-theme .pt-cat-row { background: var(--surface); }

.pt-error { padding: 3rem 0; color: var(--muted); }
.pt-error a { color: var(--primary); font-weight: 700; }

/* ── Category tabs ── */
.pt-tabs {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin: 2rem 0 0; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.pt-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem; border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-family: var(--font-sans); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap; min-height: 38px;
}
.pt-tab:hover { border-color: var(--tc, var(--primary)); color: var(--text); }
.pt-tab.active {
  background: var(--tc, var(--primary));
  border-color: var(--tc, var(--primary));
  color: #fff;
}
.pt-tab-icon { font-size: .95rem; display: flex; align-items: center; }
.pt-tab-icon svg { width: 14px; height: 14px; }
.pt-tab-name { font-size: .76rem; }

@media (max-width: 540px) {
  .pt-tabs { gap: .3rem; }
  .pt-tab { padding: .38rem .65rem; font-size: .72rem; }
  .pt-tab-name { display: none; }
  .pt-tab-icon { font-size: 1.1rem; }
  .pt-tab { min-width: 42px; justify-content: center; }
}

/* ── Category panel ── */
.pt-cat-panel { padding-top: 1.75rem; }

/* Position card */
.pt-pos-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 1.25rem 1.4rem; margin-bottom: 2rem;
}
.pt-pos-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; }
.pt-pos-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.pt-pos-icon svg { width: 20px; height: 20px; }
.pt-pos-catname { font-size: .98rem; font-weight: 700; margin-bottom: .3rem; }
.pt-pos-badge {
  display: inline-block; font-size: .7rem; font-weight: 700;
  padding: .18rem .6rem; border-radius: 99px; letter-spacing: .02em;
}

/* Scale bar */
.pt-pos-scale {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem;
}
.pt-pos-lo, .pt-pos-hi {
  font-size: .6rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); flex-shrink: 0;
  white-space: nowrap; width: 76px;
}
.pt-pos-hi { text-align: right; }
.pt-pos-track {
  flex: 1; height: 8px; background: var(--surface2);
  border-radius: 99px; position: relative;
  border: 1px solid var(--border);
}
.pt-pos-center {
  position: absolute; left: 50%; top: -3px; bottom: -3px;
  width: 1.5px; background: var(--border); transform: translateX(-50%);
}
.pt-pos-marker {
  position: absolute; top: 50%;
  width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2.5px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
  transition: left .45s cubic-bezier(.16,1,.3,1);
}
.pt-pos-meta {
  font-size: .68rem; color: var(--muted); text-align: right;
}

@media (max-width: 540px) {
  .pt-pos-lo, .pt-pos-hi { display: none; }
}

/* ── Question section ── */
.pt-q-section-title {
  font-size: .65rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: .75rem;
}

/* pt-cats-grid: shown in summary section */

