/* =========================================================================
   Knowledge Test - cream/charcoal/gold, matched to the rest of the site.
   ========================================================================= */

.quiz-hero {
  padding: 9rem 2rem 3rem;
  background: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quiz-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 800px 400px at 50% 0%, rgba(184,146,90,.10), transparent 60%);
  pointer-events: none;
}
.quiz-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -.025em;
  margin: 1rem 0 1.25rem;
  color: var(--ink);
  position: relative; z-index: 1;
}
.quiz-hero h1 em { font-style: italic; color: var(--gold-deep); font-weight: 400; }
.quiz-hero-sub {
  max-width: 620px; margin: 0 auto;
  color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7;
  position: relative; z-index: 1;
}

.quiz-stage {
  padding: 3rem 0 6rem;
  background: var(--cream);
  min-height: 60vh;
}
.view { animation: viewFade .4s var(--ease); }
@keyframes viewFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== HUB ===== */
.hub-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}
.hub-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-align: left;
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  font-family: var(--ff-body);
  display: flex; flex-direction: column; gap: .85rem;
  position: relative; overflow: hidden;
}
.hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 20px 50px rgba(29,29,27,.08);
}
.hub-card .hub-num {
  position: static !important;
  font-family: var(--ff-body);
  font-size: 2.6rem; font-weight: 500; font-style: italic;
  color: var(--gold-deep); line-height: 1;
  margin-bottom: 0.25rem;
}
.hub-card h3 {
  font-family: var(--ff-display);
  font-size: 1.5rem; font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hub-card p {
  color: var(--ink-soft); font-size: .95rem; line-height: 1.6;
}
.hub-card .hub-meta {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .85rem;
}
.hub-card .hub-time { color: var(--ink-mute); }
.hub-card .hub-cta {
  color: var(--gold-deep); font-weight: 500;
  display: inline-flex; align-items: center; gap: .35rem;
}
.hub-card .arr { transition: transform .25s var(--ease); }
.hub-card:hover .arr { transform: translateX(4px); }

.hub-card-accent { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.hub-card-accent h3 { color: var(--cream); }
.hub-card-accent p  { color: rgba(245,238,223,.75); }
.hub-card-accent .hub-num { color: var(--gold-light); }
.hub-card-accent .hub-meta { border-top-color: rgba(245,238,223,.15); }
.hub-card-accent .hub-time { color: rgba(245,238,223,.55); }
.hub-card-accent .hub-cta { color: var(--gold-light); }
.hub-card.hub-card-accent:hover {
  background: var(--ink);
  border-color: var(--gold-light);
}

.hub-note {
  text-align: center; color: var(--ink-mute);
  font-size: .85rem; margin-top: 2.5rem;
}

/* ===== INTRO ===== */
.back-link {
  background: none; border: 0; cursor: pointer;
  color: var(--ink-mute); font-size: .85rem; font-weight: 500;
  padding: 0; margin-bottom: 1.5rem;
  transition: color .2s;
}
.back-link:hover { color: var(--ink); }

.view-intro {
  max-width: 640px; margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.view-intro h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500; letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.intro-desc { color: var(--ink-soft); line-height: 1.7; margin-bottom: 2rem; }
.intro-form { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.intro-form label { display: block; }
.intro-form label > span {
  display: block;
  font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: .4rem; font-weight: 600;
}
.intro-form label > span .optional {
  font-style: italic; letter-spacing: 0;
  text-transform: none; color: var(--ink-mute); font-weight: 400;
  margin-left: .35rem;
}
.intro-form label > span .required {
  color: #b54748;
  margin-left: .2rem;
  font-size: .85rem;
}
.intro-form input {
  width: 100%; padding: .9rem 1rem;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink);
  font-family: var(--ff-body); font-size: .98rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.intro-form input:focus {
  outline: none; background: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(184,146,90,.15);
}
.intro-fine {
  color: var(--ink-mute); font-size: .82rem;
  line-height: 1.6; margin-top: .5rem;
}
.start-btn { width: 100%; padding: 1.1rem; font-size: 1rem; }

/* ===== QUESTION ===== */
.view-question { max-width: 720px; margin: 0 auto; }
.q-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; gap: 1rem;
}
.q-head .back-link { margin-bottom: 0; }
.q-progress { flex: 1; max-width: 360px; }
.q-progress-bar {
  background: var(--line-soft);
  height: 4px; border-radius: 999px; overflow: hidden;
  margin-bottom: .5rem;
}
.q-progress-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-deep));
  width: 0; transition: width .4s var(--ease);
}
.q-progress span {
  font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-mute);
  font-weight: 600;
}

.q-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.q-difficulty {
  display: inline-block;
  font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 600;
  padding: .25rem .65rem; border-radius: 999px;
  margin-bottom: 1rem;
  background: var(--cream); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.q-difficulty[data-level="easy"]   { color: #4a8a4f; border-color: #cce0cf; background: #f1f8f2; }
.q-difficulty[data-level="medium"] { color: #8c6500; border-color: #f1dca6; background: #fff8e8; }
.q-difficulty[data-level="hard"]   { color: #a8473d; border-color: #f1c7c2; background: #fbebe8; }

.q-text {
  font-family: var(--ff-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 500; line-height: 1.3;
  margin-bottom: 1.5rem;
}
.q-options { display: grid; gap: .75rem; }
.q-option {
  display: flex; align-items: stretch; gap: .85rem;
  text-align: left; cursor: pointer;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: background .2s, border-color .2s, transform .15s var(--ease);
  font-family: var(--ff-body);
}
.q-option:hover:not(:disabled) {
  background: var(--paper);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.q-option .q-letter {
  background: var(--paper);
  width: 48px;
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-style: italic; font-weight: 500;
  color: var(--gold-deep);
  border-right: 1px solid var(--line);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.q-option .q-label {
  padding: 1rem 1.1rem;
  font-size: .98rem; line-height: 1.5;
  color: var(--ink);
}
.q-option.selected {
  background: var(--ink);
  border-color: var(--ink);
}
.q-option.selected .q-letter {
  background: var(--gold-deep); color: var(--cream); border-color: var(--gold-deep);
}
.q-option.selected .q-label { color: var(--cream); }

/* ===== RESULT ===== */
.view-result { max-width: 760px; margin: 0 auto; }
.result-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
}
.result-tier {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--line);
  font-size: .82rem; letter-spacing: .15em;
  text-transform: uppercase; font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}
.result-tier .tier-emoji { font-size: 1.1rem; }
.result-tier[data-tier="advanced"],
.result-tier[data-tier="aggressive"] { background: rgba(184,146,90,.16); color: var(--gold-deep); border-color: var(--gold-light); }
.result-tier[data-tier="balanced"]    { background: #f1f8f2; color: #2c5b35; border-color: #cce0cf; }
.result-tier[data-tier="intermediate"],
.result-tier[data-tier="moderately-conservative"] { background: #fff8e8; color: #8c6500; border-color: #f1dca6; }
.result-tier[data-tier="beginner"],
.result-tier[data-tier="conservative"] { background: #f4eef5; color: #6b3a73; border-color: #e1d3e3; }

.result-score {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500; color: var(--gold-deep);
  line-height: 1; margin-bottom: 1rem;
}
.result-score strong { color: var(--ink); font-weight: 600; }
.result-headline {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500; letter-spacing: -.02em;
  margin-bottom: .85rem;
}
.result-summary {
  color: var(--ink-soft); line-height: 1.7;
  max-width: 520px; margin: 0 auto 1rem;
}
.result-meta { color: var(--ink-mute); font-size: .9rem; margin-bottom: 2rem; }

.result-gate {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem;
  margin-bottom: 2rem; text-align: left;
}
.result-gate h4 {
  font-family: var(--ff-display);
  font-size: 1.2rem; font-weight: 500;
  margin-bottom: .5rem;
}
.result-gate p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1rem; line-height: 1.6; }
.gate-form { display: flex; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.gate-form input {
  flex: 1; min-width: 220px;
  padding: .85rem 1rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--ff-body); font-size: .95rem;
  color: var(--ink);
}
.gate-form input:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(184,146,90,.15);
}
.btn-text {
  background: none; border: 0; cursor: pointer;
  color: var(--ink-mute); font-size: .85rem;
  text-decoration: underline; padding: 0;
}
.btn-text:hover { color: var(--ink); }

.result-detail { text-align: left; margin: 2rem 0; }
.result-detail h4 {
  font-family: var(--ff-display);
  font-size: 1.3rem; font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--line);
}
.detail-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-mute);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: .85rem;
}
.detail-card.right { border-left-color: #4a8a4f; }
.detail-card.wrong { border-left-color: #b54748; }
.detail-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .65rem;
}
.detail-num {
  font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 600; color: var(--ink-mute);
}
.detail-status { font-size: .82rem; font-weight: 600; }
.detail-card.right .detail-status { color: #2c5b35; }
.detail-card.wrong .detail-status { color: #8b3839; }
.detail-q {
  font-family: var(--ff-display);
  font-size: 1.05rem; font-weight: 500;
  line-height: 1.4; margin-bottom: .75rem;
}
.detail-row {
  display: flex; gap: .5rem; align-items: flex-start;
  font-size: .9rem; margin-bottom: .4rem;
  line-height: 1.5;
}
.detail-row span {
  color: var(--ink-mute); min-width: 110px;
  font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 600;
  padding-top: .15rem;
}
.detail-why {
  margin-top: .85rem; padding-top: .85rem;
  border-top: 1px dashed var(--line);
  font-size: .9rem; line-height: 1.6; color: var(--ink-soft);
}
.detail-why strong { color: var(--ink); }

.profile-cta {
  background: var(--ink); color: var(--cream);
  padding: 1.5rem 1.75rem; border-radius: var(--radius);
  font-size: .98rem; line-height: 1.7;
  text-align: left;
}

.share-row {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.share-label {
  display: block;
  font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: .85rem;
}
.share-buttons {
  display: flex; gap: .6rem;
  justify-content: center; flex-wrap: wrap;
}
.share-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  transition: all .25s var(--ease);
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29,29,27,.08);
}
.share-btn svg { flex-shrink: 0; }

.share-wa { color: #25d366; }
.share-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }

.share-x { color: var(--ink); }
.share-x:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.share-copy { color: var(--gold-deep); }
.share-copy:hover { background: var(--gold-deep); color: var(--cream); border-color: var(--gold-deep); }
.share-copy.copied {
  background: #4a8a4f; color: #fff; border-color: #4a8a4f;
}

.result-cta {
  display: flex; gap: .75rem; justify-content: center;
  flex-wrap: wrap; margin-top: 1.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hub-grid { grid-template-columns: 1fr; }
  .view-intro, .q-card, .result-card { padding: 1.75rem; }
  .quiz-hero { padding: 7rem 1.25rem 2rem; }
  .q-head { flex-direction: column; align-items: flex-start; }
  .q-progress { max-width: 100%; width: 100%; }
  .gate-form { flex-direction: column; }
  .gate-form input { width: 100%; }
  .detail-row { flex-direction: column; gap: .15rem; }
  .detail-row span { min-width: 0; }
}
