:root {
  --ink: #20364d;
  --ink-2: #40556a;
  --muted: #708090;
  --paper: #f5f3ed;
  --card: #ffffff;
  --line: #e3e4df;
  --teal: #2d8c87;
  --teal-dark: #226b68;
  --teal-soft: #e5f5f2;
  --coral: #d96c57;
  --coral-soft: #faebe7;
  --gold: #d7a744;
  --gold-soft: #fbf2dd;
  --violet: #6f63a8;
  --violet-soft: #eeebf8;
  --blue: #4e77a7;
  --blue-soft: #e8eff7;
  --shadow: 0 20px 60px rgba(32,54,77,.12);
  --shadow-small: 0 8px 24px rgba(32,54,77,.09);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(45,140,135,.09), transparent 32rem),
    radial-gradient(circle at 95% 15%, rgba(111,99,168,.08), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: var(--teal-dark); }
.hidden { display: none !important; }
.shell { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(32,54,77,.08);
  background: rgba(245,243,237,.88);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 850; letter-spacing: -.03em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center; color: white;
  background: linear-gradient(145deg, var(--teal), var(--ink));
  box-shadow: 0 8px 22px rgba(45,140,135,.28);
}
.brand-mark svg { width: 24px; height: 24px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  border: 0; cursor: pointer; border-radius: 999px; padding: 13px 20px;
  font-weight: 760; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .scale-choice:focus-visible, .axis-choice:focus-visible {
  outline: 3px solid rgba(45,140,135,.32); outline-offset: 3px;
}
.btn-primary { color: white; background: var(--teal); box-shadow: 0 10px 26px rgba(45,140,135,.25); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: var(--shadow-small); }
.btn-ghost { padding: 10px 14px; background: transparent; color: var(--ink-2); }
.btn-danger { color: var(--coral); background: var(--coral-soft); }
.screen { min-height: calc(100vh - 72px); padding: 54px 0 80px; }

/* Intro */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 44px; align-items: center; min-height: 660px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px;
  border-radius: 999px; font-size: .82rem; font-weight: 830; letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-soft); color: var(--teal-dark);
}
h1 { font-size: clamp(3rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -.065em; margin: 22px 0 24px; }
.hero-copy { font-size: 1.18rem; color: var(--ink-2); max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
   .quiz-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
  align-items: stretch;
}

.quiz-mode-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;

  width: 100%;
  min-height: 210px;
  padding: 20px;
  box-sizing: border-box;

  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  text-align: left;
  cursor: pointer;

  box-shadow: var(--shadow-small);
  transition:
transform .18s ease,
border-color .18s ease,
box-shadow .18s ease;
}

.quiz-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45,140,135,.55);
  box-shadow: 0 16px 34px rgba(32,54,77,.12);
}

.quiz-mode-card:focus-visible {
  outline: 3px solid rgba(45,140,135,.28);
  outline-offset: 3px;
}

.quiz-mode-card.quick {
  background: linear-gradient(
145deg,
rgba(45,140,135,.11),
rgba(255,255,255,.9)
  );
  border-color: rgba(45,140,135,.3);
}

.quiz-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-height: 36px;
  padding: 6px 9px;
  box-sizing: border-box;

  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);

  font-size: .73rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.quiz-mode-card.quick .quiz-mode-label {
  background: rgba(45,140,135,.14);
  color: var(--teal);
}

.quiz-mode-card > strong {
  display: block;
  margin-top: 13px;
  font-size: 1.14rem;
  line-height: 1.3;
}

.quiz-mode-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}

.quiz-mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;

  margin-top: auto;
  padding-top: 16px;

  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 720;
}

.mode-note {
  margin-top: 13px;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.45;
}    .result-mode-badge { display: inline-flex; margin-top: 12px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #d9f3ef; font-size: .78rem; font-weight: 850; }
.microcopy { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .9rem; }
.microcopy span { display: inline-flex; align-items: center; gap: 7px; }
.hero-art {
  position: relative; min-height: 520px; border-radius: 44px; overflow: hidden;
  background: linear-gradient(145deg, #e7f5f2, #f7efe5 55%, #ece9f7);
  box-shadow: var(--shadow);
  border: 1px solid rgba(32,54,77,.06);
}
.hero-art svg { width: 100%; height: 100%; min-height: 520px; display: block; }
.floating-chip {
  position: absolute; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-small); font-size: .84rem; font-weight: 780; backdrop-filter: blur(10px);
}
.chip-a { top: 28px; left: 26px; transform: rotate(-3deg); }
.chip-b { right: 24px; bottom: 34px; transform: rotate(3deg); }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 24px; }
.feature-card { background: rgba(255,255,255,.72); border: 1px solid rgba(32,54,77,.08); border-radius: var(--radius-lg); padding: 24px; }
.feature-card strong { display: block; margin: 12px 0 5px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.seo-home-section { margin-top: 28px; }
.seo-content { background: white; border: 1px solid rgba(32,54,77,.08); border-radius: 28px; padding: clamp(28px, 5vw, 48px); box-shadow: var(--shadow-small); }
.seo-content h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 14px; }
.seo-content h2 + p { margin-top: 0; }
.seo-content p { color: var(--ink-2); font-size: 1rem; line-height: 1.7; margin: 0 0 18px; }
.seo-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.seo-link-grid a { display: flex; flex-direction: column; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-decoration: none; box-shadow: 0 5px 16px rgba(32,54,77,.05); }
.seo-link-grid a:hover { border-color: rgba(45,140,135,.45); transform: translateY(-1px); }
.seo-link-grid strong { color: var(--ink); }
.seo-link-grid span { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.seo-faq { margin: 10px 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fbfbf8; }
.seo-faq summary { cursor: pointer; color: var(--ink); font-weight: 800; }
.seo-faq p { margin: 12px 0 0; }
.feature-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.feature-icon svg { width: 23px; height: 23px; }
.i-teal { background: var(--teal-soft); color: var(--teal-dark); }
.i-gold { background: var(--gold-soft); color: #9a7120; }
.i-violet { background: var(--violet-soft); color: var(--violet); }
.resume-card { margin-top: 22px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; box-shadow: var(--shadow-small); }

/* Priority */
.narrow { max-width: 920px; margin: 0 auto; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.045em; margin: 14px 0; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.axis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.axis-choice {
  text-align: left; border: 2px solid transparent; background: white; border-radius: 22px;
  padding: 20px; cursor: pointer; display: grid; grid-template-columns: 50px 1fr auto; gap: 15px; align-items: center;
  box-shadow: var(--shadow-small); transition: .18s ease;
}
.axis-choice:hover { transform: translateY(-2px); border-color: rgba(45,140,135,.24); }
.axis-choice.selected { border-color: var(--teal); background: var(--teal-soft); }
.axis-choice .axis-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 1.25rem; font-weight: 900; background: var(--paper); }
.axis-choice strong { display: block; font-size: 1rem; }
.axis-choice small { color: var(--muted); display: block; margin-top: 3px; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b8c0c5; position: relative; }
.axis-choice.selected .radio-dot { border-color: var(--teal); }
.axis-choice.selected .radio-dot::after { content: ""; position: absolute; inset: 4px; background: var(--teal); border-radius: 50%; }
.axis-choice.equal-choice { grid-column: 1 / -1; }
.axis-choice.equal-choice .axis-icon { background: var(--violet-soft); color: var(--violet); }
.priority-required {
  width: fit-content; margin: -12px auto 22px; padding: 9px 14px; border-radius: 999px;
  background: var(--gold-soft); color: #7d5e1d; font-size: .84rem; font-weight: 800; text-align: center;
}
.priority-required.chosen { background: var(--teal-soft); color: var(--teal-dark); }
.priority-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }

/* Quiz */
.quiz-shell { max-width: 960px; margin: 0 auto; }
.quiz-status { position: sticky; top: 72px; z-index: 30; padding: 16px 0 18px; background: linear-gradient(var(--paper) 78%, rgba(245,243,237,0)); }
.status-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: .92rem; }
.progress { height: 10px; background: #e5e4de; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #54b7a9); border-radius: inherit; transition: width .3s ease; }
.question-card {
  margin-top: 18px; background: white; border-radius: 32px; padding: clamp(28px, 6vw, 58px);
  box-shadow: var(--shadow); border: 1px solid rgba(32,54,77,.06); min-height: 500px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.theme-chip { display: inline-flex; align-items: center; align-self: flex-start; border-radius: 999px; padding: 8px 12px; background: var(--blue-soft); color: var(--blue); font-size: .8rem; font-weight: 830; }
.question-text { text-align: center; font-size: clamp(1.7rem, 4.5vw, 2.65rem); line-height: 1.18; letter-spacing: -.035em; max-width: 800px; margin: 44px auto 42px; }
.question-explanation {
  max-width: 760px;
  margin: -22px auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: clamp(.86rem, 1.7vw, .96rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
}
.question-detail-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  min-height: 38px;
  margin: -19px auto 30px;
  padding: 8px 12px;
  border: 1px solid rgba(45,140,135,.22);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(232,246,243,.68);
  font-size: .78rem;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.question-detail-link:hover { border-color: var(--teal); background: #d9efeb; transform: translateY(-1px); }
.question-detail-link:focus-visible { outline: 3px solid rgba(45,140,135,.32); outline-offset: 3px; }
.question-detail-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 900;
}
.scale-wrap { margin-top: auto; }
.scale-labels { display: grid; grid-template-columns: 1fr 1fr; color: var(--muted); font-size: .82rem; font-weight: 720; margin-bottom: 12px; }
.scale-labels span:last-child { text-align: right; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(7px, 1.8vw, 16px); align-items: center; }
.scale-choice {
  --size: 58px; width: var(--size); height: var(--size); margin: auto; border-radius: 50%; cursor: pointer;
  border: 3px solid currentColor; background: white; display: grid; place-items: center; font-weight: 850;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.scale-choice:hover { transform: scale(1.08); }
.scale-choice[data-value="-3"], .scale-choice[data-value="-2"], .scale-choice[data-value="-1"] { color: var(--coral); }
.scale-choice[data-value="1"], .scale-choice[data-value="2"], .scale-choice[data-value="3"] { color: var(--teal); }
.scale-choice[data-value="0"] { color: #87929a; --size: 48px; }
.scale-choice[data-value="-2"], .scale-choice[data-value="2"] { --size: 52px; }
.scale-choice[data-value="-1"], .scale-choice[data-value="1"] { --size: 46px; }
.scale-choice.selected { color: white; background: currentColor; box-shadow: 0 0 0 6px rgba(45,140,135,.11); }
.scale-choice.selected span { color: white; }
.scale-choice[data-value^="-"] .scale-choice.selected { box-shadow: 0 0 0 6px rgba(217,108,87,.12); }
.answer-caption { min-height: 28px; text-align: center; margin-top: 18px; font-weight: 760; color: var(--ink-2); }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.keyboard-hint { color: var(--muted); text-align: center; font-size: .8rem; margin-top: 14px; }
.question-comment { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.question-comment summary { cursor: pointer; color: var(--ink-2); font-weight: 780; text-align: center; }
.question-comment textarea { width: 100%; min-height: 92px; margin-top: 12px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; color: var(--ink); background: #fbfbf8; }
.question-comment textarea:focus { outline: 3px solid rgba(45,140,135,.16); border-color: var(--teal); }
.question-comment textarea::placeholder { color: #8a918f; font-style: italic; opacity: 1; }
.question-comment small { display:block; margin-top:7px; color:var(--muted); text-align:left; }

/* Open questions */
.open-card { background: white; border-radius: var(--radius-xl); padding: 30px; box-shadow: var(--shadow-small); margin-bottom: 16px; }
.open-card label { display: block; font-weight: 800; font-size: 1.08rem; margin-bottom: 12px; }
.open-card textarea { width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--line); border-radius: 15px; padding: 15px; color: var(--ink); background: #fbfbf8; }
.open-card textarea:focus { outline: 3px solid rgba(45,140,135,.18); border-color: var(--teal); }

/* Loader */
.loader-card { min-height: 520px; display: grid; place-items: center; text-align: center; }
.loader-orbit { width: 120px; height: 120px; border-radius: 50%; position: relative; margin: auto; border: 2px dashed rgba(45,140,135,.35); animation: spin 3s linear infinite; }
.loader-orbit::before, .loader-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.loader-orbit::before { width: 28px; height: 28px; background: var(--teal); top: -14px; left: 46px; }
.loader-orbit::after { inset: 28px; background: var(--ink); box-shadow: inset 0 0 0 9px white; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
.results-wrap { max-width: 1120px; margin: 0 auto; }
.result-hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: stretch;
  background: linear-gradient(140deg, #20364d, #2d5b64 58%, #3b7672);
  color: white; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow); min-height: 470px;
}
.result-copy { padding: clamp(34px, 6vw, 66px); }
.result-kicker { color: #bce5df; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 900; }
.result-title { font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.055em; margin: 18px 0 22px; }
.result-summary { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 680px; }
.result-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.result-badge { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: .84rem; font-weight: 760; }
.result-art { position: relative; min-height: 370px; overflow: hidden; }
.result-art svg { width: 100%; height: 100%; display: block; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.result-actions .btn-secondary { box-shadow: none; }
.export-modal { width: min(1040px, 100%); }
.export-choice-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; align-items: stretch; }
.export-choice-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fbfbf8; }
.export-choice-card.featured { background: linear-gradient(145deg, var(--teal-soft), #ffffff 56%, var(--gold-soft)); border-color: rgba(45,140,135,.25); }
.export-choice-card > h3 { margin: 22px 0 8px; font-size: 1.4rem; letter-spacing: -.035em; }
.export-choice-card > p { color: var(--ink-2); font-size: .9rem; }
.export-choice-card > .btn { width: 100%; margin-top: auto; }
.export-choice-label { align-self: flex-start; margin-bottom: 14px; color: var(--teal-dark); font-size: .75rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.share-preview-card { width: min(100%, 340px); aspect-ratio: 4 / 5; margin: 0 auto 14px; padding: 18px; border-radius: 22px; color: white; background: linear-gradient(145deg, #20364d, #2d5b64 58%, #3b7672); box-shadow: 0 16px 34px rgba(32,54,77,.18); overflow: hidden; }
.share-preview-kicker { display: block; color: #74c7bc; font-size: .69rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.share-preview-card h3 { margin: 5px 0 12px; color: var(--gold); font-size: 1.35rem; letter-spacing: -.035em; }
.share-preview-axes { display: grid; gap: 7px; }
.share-preview-axis { display: grid; grid-template-columns: 94px 1fr 35px; gap: 7px; align-items: center; font-size: .68rem; }
.share-preview-axis > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-preview-axis > strong { text-align: right; font-variant-numeric: tabular-nums; }
.share-preview-track { position: relative; height: 5px; border-radius: 999px; background: linear-gradient(90deg, #e49b8c, #d9d9d2 50%, #74c7bc); }
.share-preview-track::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: rgba(32,54,77,.35); }
.share-preview-track i { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%,-50%); background: white; border: 3px solid var(--ink); }
.share-preview-match { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 9px 10px; border-radius: 12px; background: #fbfaf6; color: var(--ink); }
.share-preview-match.country { margin-top: 7px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); }
.share-preview-match span { min-width: 0; }
.share-preview-match small { display: block; color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.share-preview-match.country small { color: #bce5df; }
.share-preview-match b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.share-preview-match > strong { flex: none; color: var(--teal-dark); font-size: 1rem; }
.share-preview-match.country > strong { color: var(--gold); }
.full-report-icon { display: grid; place-items: center; width: 118px; aspect-ratio: 210 / 297; margin: 24px auto 4px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: white; box-shadow: var(--shadow-small); font-size: 1.55rem; font-weight: 900; }
.raw-export-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 16px 18px; border-radius: 17px; background: #f3f3ee; }
.raw-export-row strong, .raw-export-row span { display: block; }
.raw-export-row span { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.raw-export-row .btn { flex: none; }
.section-card { margin-top: 24px; background: white; border: 1px solid rgba(32,54,77,.06); border-radius: 28px; padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow-small); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.section-title h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.35rem); letter-spacing: -.04em; }
.section-title p { margin: 5px 0 0; color: var(--muted); }
.axis-results { display: grid; gap: 20px; }
.axis-result { display: grid; grid-template-columns: 190px 1fr 72px; gap: 18px; align-items: center; }
.axis-result strong { font-size: .98rem; }
.axis-result small { display: block; color: var(--muted); margin-top: 2px; }
.axis-track { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #f2c5bc, #efeee8 50%, #a9ddd5); }
.axis-track::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: 50%; width: 2px; background: rgba(32,54,77,.25); }
.axis-marker { position: absolute; width: 24px; height: 24px; border-radius: 50%; top: 50%; transform: translate(-50%,-50%); background: white; border: 6px solid var(--ink); box-shadow: 0 4px 13px rgba(32,54,77,.22); }
.axis-value { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.axis-endpoints { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: -12px; }
.match-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.match-card { border: 1px solid var(--line); background: #fbfbf8; border-radius: 20px; padding: 20px; position: relative; overflow: hidden; }
.match-card.top { background: linear-gradient(145deg, var(--teal-soft), white); border-color: rgba(45,140,135,.25); }
.match-rank { color: var(--muted); font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.match-card h3 { margin: 9px 0 15px; font-size: 1.12rem; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-number { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.mini-bar { height: 9px; background: #e7e6e0; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #66c2b5); border-radius: inherit; }
.match-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: 12px; }
.match-card .btn { width: 100%; margin-top: 16px; padding: 10px 14px; }
.tabs { display: inline-flex; background: #efeee8; border-radius: 999px; padding: 4px; }
.tab { border: 0; cursor: pointer; padding: 9px 15px; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 760; }
.tab.active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(32,54,77,.1); }
.compass-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: center; min-width: 0; }
.compass-box { width: 100%; min-width: 0; aspect-ratio: 1.45; min-height: 460px; border-radius: 22px; overflow: hidden; background: #fbfbf8; border: 1px solid var(--line); }
.compass-box svg { width: 100%; height: 100%; display: block; }
.compass-legend { display: grid; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .9rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot-user { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.dot-party { background: var(--teal); }
.dot-gov { background: var(--violet); }
.detail-bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.disclaimer-card {
  margin-top: 22px; padding: 22px 24px; border-radius: 20px;
  background: var(--gold-soft); border: 1px solid rgba(215,167,68,.34);
  color: #604b1d; box-shadow: var(--shadow-small);
}
.disclaimer-card strong { display: block; margin-bottom: 7px; color: #4e3b13; }
.disclaimer-card p { margin: 0; }
.disclaimer-card p + p { margin-top: 8px; }
.detail-bar { padding: 16px; border-radius: 16px; background: #fbfbf8; border: 1px solid var(--line); }
.detail-bar-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-weight: 780; }
.detail-bar .mini-bar { margin-top: 0; }
details.method { border-top: 1px solid var(--line); padding: 15px 0; }
details.method:first-child { border-top: 0; }
details.method summary { cursor: pointer; font-weight: 820; }
details.method p { color: var(--ink-2); margin-bottom: 0; }
.formula { margin-top: 12px; padding: 14px; border-radius: 14px; background: #f3f5f5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; overflow-x: auto; }


/* Analyse IA facultative */
.ai-analysis-card {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, #f5fbfa 0%, #ffffff 54%, #fff9ea 100%);
  border-color: rgba(45,140,135,.18);
}
.ai-analysis-card::before {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  right: -95px; top: -110px; background: radial-gradient(circle, rgba(45,140,135,.16), transparent 68%);
  pointer-events: none;
}
.ai-label { display: inline-flex; align-items: center; gap: 8px; color: #236d69; background: var(--teal-soft); border-radius: 999px; padding: 7px 11px; font-size: .78rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.ai-connect-status { display: flex; align-items: center; gap: 9px; margin: 4px 0 16px; color: var(--muted); font-size: .9rem; }
.ai-connect-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #aeb8bd; flex: none; }
.ai-connect-status.ready::before { background: #2d8c87; box-shadow: 0 0 0 4px rgba(45,140,135,.12); }
.ai-connect-status.error::before { background: #d96c57; box-shadow: 0 0 0 4px rgba(217,108,87,.12); }
.ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.ai-option { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: 14px; background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.ai-option input { margin-top: 3px; accent-color: var(--teal); }
.ai-consent-box { display: grid; gap: 12px; margin-top: 16px; }
.ai-consent-warning { padding: 16px 18px; border-radius: 15px; background: #fff4e5; border: 1px solid rgba(215,167,68,.35); color: #654b17; font-size: .9rem; }
.ai-consent-warning strong { display: block; margin-bottom: 7px; color: #4e3b13; }
.ai-consent-warning ul { margin: 8px 0 0; padding-left: 20px; }
.ai-consent-warning li + li { margin-top: 5px; }
.ai-consent-warning a { color: inherit; font-weight: 760; }
.ai-privacy { color: var(--muted); font-size: .82rem; margin: 13px 0 0; }
.ai-loading { display: flex; align-items: center; gap: 12px; padding: 18px; margin-top: 20px; border-radius: 16px; background: white; border: 1px solid var(--line); color: var(--ink-2); }
.ai-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #dbe5e3; border-top-color: var(--teal); animation: spin .85s linear infinite; flex: none; }
.ai-output { margin-top: 24px; display: grid; gap: 18px; }
.ai-output-head { padding: 22px; border-radius: 20px; background: linear-gradient(135deg, #20364d, #2d6968); color: white; }
.ai-output-head h3 { margin: 7px 0 10px; font-size: clamp(1.5rem, 3vw, 2.15rem); }
.ai-output-head p { margin: 0; color: rgba(255,255,255,.84); }
.ai-panel { padding: 21px; border-radius: 18px; background: white; border: 1px solid var(--line); }
.ai-panel h3 { margin: 0 0 13px; font-size: 1.18rem; }
.ai-axis-grid, .ai-party-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.ai-mini-card { padding: 16px; border-radius: 15px; background: #fbfbf8; border: 1px solid var(--line); }
.ai-mini-card strong { display: block; margin-bottom: 7px; }
.ai-mini-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.ai-list { margin: 0; padding-left: 20px; color: var(--ink-2); }
.ai-list li + li { margin-top: 8px; }
.ai-warning { padding: 16px 18px; border-radius: 15px; background: var(--gold-soft); color: #604b1d; border: 1px solid rgba(215,167,68,.28); font-size: .9rem; }
.ai-server-help { padding: 15px 17px; border-radius: 14px; background: #fff4f1; border: 1px solid rgba(217,108,87,.24); color: #784335; font-size: .88rem; margin-top: 12px; }
@media (max-width: 760px) { .ai-axis-grid, .ai-party-grid { grid-template-columns: 1fr; } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(23,35,48,.62); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal { width: min(920px, 100%); max-height: min(88vh, 900px); overflow: auto; background: white; border-radius: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-head { position: sticky; top: 0; z-index: 2; padding: 24px 28px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.modal-head h2 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -.04em; }
.modal-body { padding: 28px; }
.close-btn { border: 0; background: #efeee8; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }
.compare-axis-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: start;
  gap: 18px;
  margin: 22px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.compare-axis-row:last-child {
  border-bottom: 0;
}

.compare-axis-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compare-axis-title strong {
  font-size: .95rem;
}

.compare-axis-similarity {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.compare-axis-visual {
  min-width: 0;
}

.compare-axis-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
}

.compare-axis-endpoints span:last-child {
  text-align: right;
}

.compare-axis-reading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 11px;
  color: var(--ink-2);
  font-size: .8rem;
}

.compare-axis-reading > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.compare-axis-reading b {
  font-variant-numeric: tabular-nums;
}

.compare-reading-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.compare-reading-dot.marker-user {
  background: var(--gold);
}

.compare-reading-dot.marker-entity {
  background: var(--teal);
}
.two-marker-track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #f2c5bc, #efeee8 50%, #a9ddd5); }
.two-marker { position: absolute; top: 50%; width: 17px; height: 17px; border-radius: 50%; transform: translate(-50%,-50%); border: 4px solid white; box-shadow: 0 2px 9px rgba(32,54,77,.25); }
.marker-user { background: var(--gold); }
.marker-entity { background: var(--teal); }
.drivers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.driver-box { border-radius: 18px; padding: 18px; }
.driver-box.agree { background: var(--teal-soft); }
.driver-box.disagree { background: var(--coral-soft); }
.driver-box h3 { margin-top: 0; }
.driver-item { padding: 10px 0; border-top: 1px solid rgba(32,54,77,.08); font-size: .88rem; }
.driver-item:first-of-type { border-top: 0; }
.driver-score { font-weight: 850; display: block; margin-top: 4px; }
.modal.notes-expanded { width: min(1240px, 100%); }
.all-notes-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.all-notes-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; }
.all-notes-chevron { font-size: 1.15rem; line-height: 1; transition: transform .2s ease; }
.all-notes-toggle[aria-expanded="true"] .all-notes-chevron { transform: rotate(180deg); }
.all-notes-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.all-notes-intro { margin: 0; padding: 14px 16px; color: var(--muted); background: #f8f8f4; border-bottom: 1px solid var(--line); font-size: .82rem; }
.all-notes-table-wrap { max-height: min(62vh, 720px); overflow: auto; }
.all-notes-table { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.all-notes-table th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; background: #f1f2ed; color: var(--ink-2); border-bottom: 1px solid var(--line); text-align: left; font-size: .74rem; letter-spacing: .01em; }
.all-notes-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.all-notes-table tbody tr:last-child td { border-bottom: 0; }
.all-notes-table th:nth-child(1), .all-notes-table td:nth-child(1) { width: 30%; }
.all-notes-table th:nth-child(2), .all-notes-table td:nth-child(2), .all-notes-table th:nth-child(3), .all-notes-table td:nth-child(3) { width: 10%; }
.all-notes-table th:nth-child(4), .all-notes-table td:nth-child(4) { width: 38%; }
.all-notes-table th:nth-child(5), .all-notes-table td:nth-child(5) { width: 12%; }
.all-notes-question-meta { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.all-notes-table td > strong { display: block; line-height: 1.4; color: var(--ink); }
.all-notes-score-cell small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; line-height: 1.25; }
.all-notes-note { display: inline-flex; min-width: 34px; min-height: 28px; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-weight: 900; font-variant-numeric: tabular-nums; }
.all-notes-note.is-user { background: var(--gold-soft); color: #785b18; }
.all-notes-note.is-entity { background: var(--teal-soft); color: #176d68; }
.all-notes-note.is-empty { background: #efeee8; color: var(--muted); }
.all-notes-justification { display: block; line-height: 1.48; }
.all-notes-source { display: inline-flex; font-weight: 800; white-space: nowrap; }
.all-notes-no-source { color: var(--muted); }

.source-list { margin: 20px 0 0; padding-left: 18px; word-break: break-word; font-size: .82rem; }

footer { padding: 50px 0; color: var(--muted); font-size: .85rem; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 16px; }
.footer-links a { font-weight: 750; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 120; color: white; background: var(--ink); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) {
  .hero, .result-hero, .compass-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 14px; }
  .hero-art { min-height: 390px; }
  .hero-art svg { min-height: 390px; }
  .feature-grid { grid-template-columns: 1fr; }
  .seo-link-grid { grid-template-columns: 1fr; }
  .quiz-mode-grid { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr 1fr; }
  .result-art { min-height: 300px; }
  .compass-legend { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 22px, var(--max)); }
  .top-actions .btn-secondary { display: none; }
  .screen { padding-top: 30px; }
  .axis-grid, .match-grid, .detail-bars, .drivers { grid-template-columns: 1fr; }
  .axis-choice { grid-template-columns: 45px 1fr auto; padding: 16px; }
  .question-card { border-radius: 24px; padding: 24px 18px; min-height: 530px; }
  .question-text { font-size: 1.62rem; margin: 34px auto; }
  .question-explanation { margin: -16px auto 28px; font-size: .86rem; }
  .question-detail-link { width: auto; margin: -14px auto 26px; padding: 8px 11px; }
  .scale { gap: 5px; }
  .scale-choice { --size: 42px; border-width: 2px; font-size: .82rem; }
  .scale-choice[data-value="-2"], .scale-choice[data-value="2"] { --size: 39px; }
  .scale-choice[data-value="-1"], .scale-choice[data-value="1"] { --size: 36px; }
  .scale-choice[data-value="0"] { --size: 34px; }
  .axis-result { grid-template-columns: 1fr 54px; }
  .axis-result .axis-track { grid-column: 1 / 3; }
  .axis-endpoints { grid-column: 1 / 3; }
  .result-copy { padding: 32px 24px; }
  .result-title { font-size: 2.7rem; }
  .export-choice-grid { grid-template-columns: 1fr; }
  .export-choice-card { padding: 18px; }
  .share-preview-card { width: min(100%, 360px); }
  .raw-export-row { align-items: stretch; flex-direction: column; }
  .raw-export-row .btn { width: 100%; }
  .matches-title { align-items: stretch; flex-direction: column; }
  .matches-title .tabs { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); width: 100%; }
  .matches-title .tab { min-width: 0; padding-inline: 10px; }
  .compass-box { min-height: 0; aspect-ratio: 760 / 520; }
  .compass-legend { grid-template-columns: 1fr; }
  .modal.notes-expanded { width: 100%; }
  .all-notes-panel { border-radius: 16px; }
  .all-notes-table-wrap { max-height: none; overflow: visible; }
  .all-notes-table { min-width: 0; display: block; font-size: .82rem; }
  .all-notes-table thead { display: none; }
  .all-notes-table tbody, .all-notes-table tr, .all-notes-table td { display: block; width: 100%; }
  .all-notes-table tr { padding: 15px; border-bottom: 1px solid var(--line); }
  .all-notes-table tr:last-child { border-bottom: 0; }
  .all-notes-table td { position: relative; min-height: 30px; padding: 6px 0 6px 112px; border: 0; }
  .all-notes-table td::before { content: attr(data-label); position: absolute; left: 0; top: 7px; width: 100px; color: var(--muted); font-size: .69rem; font-weight: 850; }
  .all-notes-table td[data-label="Question"] { padding: 0 0 10px; }
  .all-notes-table td[data-label="Question"]::before { display: none; }
  .all-notes-table th:nth-child(n), .all-notes-table td:nth-child(n) { width: 100%; }
  .all-notes-source { white-space: normal; }
  .modal-body, .modal-head { padding: 20px; }
  .compare-axis-row {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0;
}

.compare-axis-reading {
  flex-direction: column;
  gap: 6px;
}

.compare-axis-endpoints {
  font-size: .68rem;
}
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; }
  .topbar, .result-actions, footer, .btn, .modal-backdrop, #screen-intro, #screen-priority, #screen-quiz, #screen-open, #screen-processing { display: none !important; }
  #screen-results { display: block !important; padding: 0; }
  .result-hero { box-shadow: none; break-inside: avoid; }
  .section-card { box-shadow: none; break-inside: avoid; }
}
