/* ════════════════════════════════════════════════════════════════════
   16 PHILOSOPHIES — quiz stylesheet  (v0.4.0)

   Visual identity: cream paper, fox-russet ink, aged brass accents.
   Footer is now a deeper cream (no purple/aubergine). Landing leans
   on the 'Philosopher' Google font; the rest of the site continues to
   use Libre Baskerville for headings + Montserrat for body.

   Architecture borrowed directly from Kwokka:
     - CSS variables for palette + nav height
     - 1fr auto 1fr grid navbar with glassmorphism backdrop-filter
     - Mobile drawer with .visible toggle and pointer-events guard
     - Likert button .default-img / .hover-img swap, gated behind
       (hover: hover) and (pointer: fine)
     - Slide transitions via .active / .fading-out + @keyframes
     - Sticky desktop sidebar + horizontal pill nav on mobile
   ════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

#phil16-root {
  /* ── Palette ─────────────────────────────────────────────────────── */
  --phil16-bg:       #f5f5f5;             /* smoke white (page) */
  --phil16-bg-alt:   #ffffff;             /* card surfaces */
  --phil16-bg-deep:  #e3e3e3;             /* footer — couple shades darker than page */
  --phil16-ink:      #221a14;             /* warm near-black */
  --phil16-ink-soft: #5b4a3a;             /* secondary text */
  --phil16-ink-mute: #8a7a66;             /* tertiary / italic */
  --phil16-russet:   #b8462a;             /* fox-russet — the brand spike */
  --phil16-russet-dk:#8c2d18;             /* hover / pressed */
  --phil16-brass:    #c89a3c;             /* aged brass highlight */
  --phil16-card:     rgba(255, 255, 255, 0.85);
  --phil16-shadow:   rgba(34, 26, 20, 0.13);

  /* ── Likert fox colours — outlines match the button's own fox ────── */
  --phil16-fox-SD:   #722f1f;   /* deep crimson */
  --phil16-fox-D:    #b8462a;   /* russet */
  --phil16-fox-sD:   #d68a76;   /* salmon */
  --phil16-fox-N:    #8a7a66;   /* mute brown */
  --phil16-fox-sA:   #95b677;   /* sage */
  --phil16-fox-A:    #5e8a3a;   /* meadow green */
  --phil16-fox-SA:   #2f5a1f;   /* forest */

  /* ── Layout tokens ───────────────────────────────────────────────── */
  --phil16-nav-h:    72px;
  --phil16-radius:   14px;
  --phil16-radius-lg:20px;
  --phil16-easing:   cubic-bezier(0.22, 1, 0.36, 1);

  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--phil16-ink);
  background: var(--phil16-bg);
}

body.phil16-quiz-page {
  background: var(--phil16-bg);
  color: var(--phil16-ink);
}

/* iOS Safari overflow trick — DO this on <html>, NEVER on <body>. */
html { overflow-x: hidden; }

body.phil16-drawer-open {
  overflow: hidden;
  padding-right: var(--phil16-scrollbar-width, 0px);
}

/* ════════════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════════════ */
.phil16-nav a, .phil16-nav a:hover, .phil16-nav a:active, .phil16-nav a:visited,
.phil16-drawer a, .phil16-drawer a:hover, .phil16-drawer a:active, .phil16-drawer a:visited {
  text-decoration: none !important;
}

.phil16-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--phil16-nav-h);
  background: rgba(245, 245, 245, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(184, 70, 42, 0.18);
  box-shadow: 0 2px 16px var(--phil16-shadow);
}

.phil16-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
}

/* — Brand (centre column) — */
.phil16-nav-brand {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--phil16-ink);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: opacity 0.25s;
  justify-self: center;
}
.phil16-nav-brand em {
  font-style: italic;
  color: var(--phil16-russet);
  margin-right: 2px;
  font-weight: 700;
}
.phil16-nav-brand:hover { opacity: 0.78; }

/* ════════════════════════════════════════════════════════════════════
   SCROLL-MENU TRIGGER  (top-left, replaces the old social icons / dropdown)

   Visual: a small rolled-papyrus glyph that rocks gently. Click → the
   scroll drawer unfurls underneath the navbar. The drawer itself lives
   below in its own block.
   ════════════════════════════════════════════════════════════════════ */
.phil16-scroll-trigger {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--phil16-ink-soft);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.phil16-scroll-trigger:hover,
.phil16-scroll-trigger.open {
  color: var(--phil16-russet);
  background: rgba(184, 70, 42, 0.07);
}
.phil16-scroll-trigger svg {
  width: 30px;
  height: 30px;
  transition: transform 0.4s var(--phil16-easing);
}
.phil16-scroll-trigger:hover svg {
  transform: rotate(-6deg);
}
.phil16-scroll-trigger.open svg {
  transform: rotate(0deg) scale(1.05);
}
.phil16-scroll-trigger-label {
  display: inline-block;
  font-weight: 600;
}

/* — Right-column slot — keeps the grid balanced (placeholder) — */
.phil16-nav-spacer { justify-self: end; }

@media (max-width: 640px) {
  .phil16-scroll-trigger-label { display: none; }
  .phil16-nav-inner { padding: 0 14px; }
}

/* ════════════════════════════════════════════════════════════════════
   SCROLL DRAWER — the unrolling-papyrus menu

   Sits below the navbar, anchored top-left, max width ~360px. Top and
   bottom edges have decorative rolled-paper "rods" drawn in CSS so we
   don't depend on an external image. Greek-key border lives as a
   repeating SVG background.
   ════════════════════════════════════════════════════════════════════ */
.phil16-scroll-drawer {
  position: fixed;
  top: var(--phil16-nav-h);
  left: 18px;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - var(--phil16-nav-h) - 24px);
  z-index: 999;

  /* Closed state — collapsed up into the navbar with clip-path so the
   * unfurl reads as the scroll rolling open downward. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition:
    opacity 0.32s var(--phil16-easing),
    transform 0.42s var(--phil16-easing),
    clip-path 0.55s var(--phil16-easing),
    visibility 0.42s;
}
.phil16-scroll-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

.phil16-scroll-paper {
  position: relative;
  background:
    /* subtle parchment grain */
    radial-gradient(circle at 20% 25%, rgba(184,70,42,0.05), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(140,45,24,0.06), transparent 60%),
    linear-gradient(180deg, #f3ead0 0%, #ece1bf 100%);
  color: var(--phil16-ink);
  border-left: 1px solid rgba(80, 50, 28, 0.22);
  border-right: 1px solid rgba(80, 50, 28, 0.22);
  padding: 26px 22px 26px;
  margin: 14px 0;
  box-shadow: 0 18px 40px rgba(34, 26, 20, 0.22);
  overflow-y: auto;
  max-height: calc(100vh - var(--phil16-nav-h) - 56px);
}

/* The two wooden "rod ends" top and bottom — drawn as rounded bars
 * with a subtle wood-grain gradient. */
.phil16-scroll-rod {
  position: absolute;
  left: -6px; right: -6px;
  height: 18px;
  border-radius: 10px;
  background:
    linear-gradient(180deg,
      #6b4a2c 0%,
      #8a6438 25%,
      #5a3d22 55%,
      #8a6438 80%,
      #6b4a2c 100%);
  box-shadow:
    0 1px 0 rgba(255, 240, 210, 0.3) inset,
    0 4px 10px rgba(34, 26, 20, 0.28);
}
.phil16-scroll-rod.top    { top:    -2px; }
.phil16-scroll-rod.bottom { bottom: -2px; }
/* Tiny knobs at each end of the rods */
.phil16-scroll-rod::before,
.phil16-scroll-rod::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 12px; height: 22px;
  background: radial-gradient(ellipse at center, #8a6438 0%, #5a3d22 70%, #3d2814 100%);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 4px rgba(34, 26, 20, 0.4);
}
.phil16-scroll-rod::before { left:  -8px; }
.phil16-scroll-rod::after  { right: -8px; }

/* Greek-key meander stripe — top + bottom of paper */
.phil16-scroll-meander {
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'><g fill='none' stroke='%235b4a3a' stroke-width='1.4'><path d='M0 13 L0 3 L10 3 L10 10 L4 10 L4 6 L7 6 M16 13 L16 3 L26 3 L26 10 L20 10 L20 6 L23 6'/></g></svg>");
  background-repeat: repeat-x;
  background-size: 32px 16px;
  opacity: 0.55;
  margin: 4px 0 14px;
}
.phil16-scroll-meander.bottom { margin: 14px 0 4px; }

.phil16-scroll-heading {
  font-family: 'Philosopher', 'Libre Baskerville', serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--phil16-russet);
  text-align: center;
  margin: 0 0 8px;
}
.phil16-scroll-subheading {
  font-family: 'Philosopher', 'Libre Baskerville', serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phil16-ink-mute);
  text-align: center;
  margin: 12px 0 8px;
}

.phil16-scroll-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phil16-scroll-link {
  display: block;
  padding: 9px 12px;
  font-family: 'Philosopher', 'Libre Baskerville', serif;
  font-size: 1rem;
  color: var(--phil16-ink);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--phil16-easing);
}
.phil16-scroll-link:hover {
  background: rgba(184, 70, 42, 0.08);
  color: var(--phil16-russet);
  transform: translateX(3px);
}

.phil16-scroll-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.phil16-scroll-type {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  font-family: 'Philosopher', 'Libre Baskerville', serif;
  font-size: 0.86rem;
  color: var(--phil16-ink);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.phil16-scroll-type:hover {
  background: rgba(184, 70, 42, 0.08);
  color: var(--phil16-russet);
}
.phil16-scroll-type-num {
  font-style: italic;
  color: var(--phil16-brass);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
}

.phil16-scroll-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(91, 74, 58, 0.3);
}
.phil16-scroll-socials a {
  width: 22px; height: 22px;
  color: var(--phil16-ink-soft);
  transition: color 0.2s, transform 0.2s;
}
.phil16-scroll-socials a:hover {
  color: var(--phil16-russet);
  transform: translateY(-2px);
}
.phil16-scroll-socials svg { width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════════════
   QUIZ PAGE WRAPPER + STARS CANVAS
   ════════════════════════════════════════════════════════════════════ */
.phil16-quiz-page {
  padding-top: var(--phil16-nav-h);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

#phil16-stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  transition: opacity 0.6s ease;
}
/* Stars only ride on the landing — once the quiz starts they fade so
 * they don't compete with question copy. */
html.phil16-quiz-started #phil16-stars-canvas { opacity: 0; }

/* ── Earth at bottom of viewport ─────────────────────────────────────
 * Fixed-position big sphere, ~50% poking above the bottom edge. Mouse
 * X drives a smooth rotation (capped ±40°). Hides when quiz starts so
 * it never competes w/ question copy. */
#phil16-earth-wrapper {
  position: fixed;
  left: 50%;
  bottom: -40vh;
  width: 80vh;
  height: 80vh;
  max-width: 1100px;
  max-height: 1100px;
  pointer-events: none;
  z-index: 0;
  transform: translateX(-50%);
  transition: opacity 0.6s ease;
  opacity: 0.95;
}
#phil16-earth-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  will-change: transform;
  transition: transform 0.18s ease-out;
  filter: drop-shadow(0 -14px 60px rgba(0, 0, 0, 0.18));
}
html.phil16-quiz-started #phil16-earth-wrapper { opacity: 0; }
@media (max-width: 720px) {
  #phil16-earth-wrapper {
    width: 110vw; height: 110vw;
    bottom: -55vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  #phil16-earth-img { transition: none; }
}

/* Everything else needs to sit above the stars. */
.phil16-quiz-page > * { position: relative; z-index: 1; }
#phil16-landing { z-index: 1; }

/* ────────────────────────────────────────────────────────────────────
   LANDING  (Philosopher font everywhere)
   ──────────────────────────────────────────────────────────────────── */
#phil16-landing {
  min-height: calc(100vh - var(--phil16-nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  text-align: center;
  position: relative;
  font-family: 'Philosopher', 'Libre Baskerville', serif;
}

#phil16-landing,
#phil16-landing * {
  font-family: 'Philosopher', 'Libre Baskerville', serif;
}

.phil16-landing-mascot {
  margin-bottom: 28px;
  animation: phil16-mascot-float 4.5s ease-in-out infinite;
}
.phil16-landing-mascot img,
.phil16-landing-mascot video {
  max-width: 240px;
  width: 50vw;
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(184, 70, 42, 0.18));
  display: block;
  margin: 0 auto;
  border-radius: 50%;
  background: transparent;
}
@keyframes phil16-mascot-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* — Hero typewriter line — */
.phil16-landing-hero {
  font-size: clamp(2.4rem, 6.6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--phil16-ink);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  min-height: 1.2em;
}
.phil16-landing-hero em {
  font-style: italic;
  color: var(--phil16-russet);
  font-weight: 700;
}
/* Blinking caret while the typewriter runs */
.phil16-typed-caret {
  display: inline-block;
  width: 3px;
  height: 0.92em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--phil16-russet);
  animation: phil16-caret-blink 0.85s steps(2) infinite;
}
.phil16-typed-caret.done { animation: phil16-caret-fade 1.6s ease forwards; }
@keyframes phil16-caret-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@keyframes phil16-caret-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* — Rotating "Are you a [type]?" line — */
.phil16-landing-rotator {
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
  font-style: italic;
  color: var(--phil16-ink-soft);
  margin: 14px 0 24px;
  min-height: 1.6em;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4em;
}
.phil16-rotator-prefix {
  color: var(--phil16-ink-soft);
}
.phil16-rotator-type {
  display: inline-block;
  color: var(--phil16-russet);
  font-weight: 700;
  font-style: italic;
  position: relative;
  min-width: 6ch;
  transition: opacity 0.35s ease, transform 0.4s var(--phil16-easing);
}
.phil16-rotator-type.swapping {
  opacity: 0;
  transform: translateY(-6px);
}

.phil16-landing-subtitle {
  font-size: clamp(0.98rem, 1.8vw, 1.12rem);
  color: var(--phil16-ink-soft);
  max-width: 560px;
  line-height: 1.7;
  margin: 18px auto 36px;
}

.phil16-landing-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'Caveat', cursive !important;   /* keep handwritten feel */
  font-size: 1.18rem;
  color: var(--phil16-ink-mute);
  margin-top: 12px;
  cursor: pointer;
  animation: phil16-bob 2.4s ease-in-out infinite;
}
.phil16-landing-scroll svg { color: var(--phil16-russet); opacity: 0.7; }
@keyframes phil16-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ────────────────────────────────────────────────────────────────────
   QUIZ CONTAINER + PROGRESS BAR
   ──────────────────────────────────────────────────────────────────── */
#phil16-quiz-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}

.phil16-progress-wrapper {
  position: sticky;
  top: var(--phil16-nav-h);
  background: rgba(239, 231, 211, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 4px 12px;
  margin: 0 -22px 20px;
  z-index: 10;
}
.phil16-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--phil16-ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 22px;
  margin-bottom: 8px;
  font-weight: 600;
}
.phil16-progress-track {
  position: relative;
  margin: 0 22px;
  height: 28px;
}
.phil16-progress-bar-outer {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  height: 4px;
  background: rgba(184, 70, 42, 0.14);
  border-radius: 999px;
  overflow: hidden;
}
.phil16-progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--phil16-russet), var(--phil16-brass));
  width: 0%;
  border-radius: 999px;
  transition: width 0.4s var(--phil16-easing);
}
.phil16-progress-fox {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 28px; height: 28px;
  transform: translate(-50%, -50%);
  transition: left 0.4s var(--phil16-easing);
  pointer-events: none;
}

/* ────────────────────────────────────────────────────────────────────
   SLIDES
   ──────────────────────────────────────────────────────────────────── */
.phil16-slide {
  display: none;
  animation: phil16-slide-in 0.45s var(--phil16-easing);
}
.phil16-slide.active     { display: block; }
.phil16-slide.fading-out { animation: phil16-slide-out 0.3s var(--phil16-easing) forwards; }

@keyframes phil16-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes phil16-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-20px); }
}

.phil16-slide-header {
  text-align: center;
  margin: 18px auto 22px;
  max-width: 600px;
}
.phil16-slide-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--phil16-brass);
  font-weight: 700;
  margin-bottom: 6px;
}
.phil16-slide-header h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--phil16-ink);
  margin-bottom: 8px;
  line-height: 1.25;
}
.phil16-slide-header h2 em {
  font-style: italic;
  color: var(--phil16-russet);
}
.phil16-slide-header p {
  color: var(--phil16-ink-soft);
  font-style: italic;
  font-size: 0.96rem;
}

.phil16-question-card {
  background: var(--phil16-card);
  border: 1px solid rgba(184, 70, 42, 0.16);
  border-radius: var(--phil16-radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px var(--phil16-shadow);
  transition: transform 0.25s var(--phil16-easing), box-shadow 0.25s ease;
}
.phil16-question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--phil16-shadow);
}
.phil16-question-text {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(0.98rem, 2.1vw, 1.08rem);
  line-height: 1.55;
  color: var(--phil16-ink);
  margin-bottom: 16px;
}
.phil16-question-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--phil16-russet);
  color: #fdf8ec;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ── Likert buttons (7-point fox row) ── */
.phil16-likert-options {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.phil16-likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 3px solid transparent;
  border-radius: 14px;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 62px;
  font-family: inherit;
  --phil16-likert-color: var(--phil16-russet);
}
/* Each button declares its own colour via data-value — used for both
 * hover hint and selected-state outline. Outline now matches the fox
 * face beneath it: deep red for SD, sage for sA, forest for SA, etc. */
.phil16-likert-btn[data-value="SD"] { --phil16-likert-color: var(--phil16-fox-SD); }
.phil16-likert-btn[data-value="D"]  { --phil16-likert-color: var(--phil16-fox-D);  }
.phil16-likert-btn[data-value="sD"] { --phil16-likert-color: var(--phil16-fox-sD); }
.phil16-likert-btn[data-value="N"]  { --phil16-likert-color: var(--phil16-fox-N);  }
.phil16-likert-btn[data-value="sA"] { --phil16-likert-color: var(--phil16-fox-sA); }
.phil16-likert-btn[data-value="A"]  { --phil16-likert-color: var(--phil16-fox-A);  }
.phil16-likert-btn[data-value="SA"] { --phil16-likert-color: var(--phil16-fox-SA); }

.phil16-likert-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.phil16-likert-btn .phil16-img-hover { display: none; }
.phil16-likert-btn.selected img.phil16-img-default { display: none; }
.phil16-likert-btn.selected img.phil16-img-hover   { display: block; }

@media (hover: hover) and (pointer: fine) {
  .phil16-likert-btn:hover img.phil16-img-default { display: none; }
  .phil16-likert-btn:hover img.phil16-img-hover   { display: block; }
  .phil16-likert-btn:hover {
    transform: scale(1.08);
    border-color: var(--phil16-likert-color);
    background: color-mix(in srgb, var(--phil16-likert-color) 9%, transparent);
  }
  .phil16-likert-btn:hover img { transform: scale(1.1); }
}

/* SELECTED: outline tinted to the button's fox colour. */
.phil16-likert-btn.selected {
  border-color: var(--phil16-likert-color);
  background: color-mix(in srgb, var(--phil16-likert-color) 10%, transparent);
  transform: scale(1.06);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--phil16-likert-color) 28%, transparent);
  will-change: transform;
}
.phil16-likert-btn.selected img { transform: scale(1.05); }

/* Fallback for browsers without color-mix support — the variables still
 * apply so the outline stays correct even without the tinted bg. */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .phil16-likert-btn.selected { background: rgba(184, 70, 42, 0.09); }
}

.phil16-likert-label {
  font-size: 0.56rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--phil16-ink-mute);
  text-align: center;
  line-height: 1.2;
  max-width: 60px;
}

/* ── Binary dilemma ── */
.phil16-dilemma-scenario {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: clamp(0.96rem, 2vw, 1.12rem);
  line-height: 1.7;
  color: var(--phil16-ink);
  max-width: 580px;
  margin: 0 auto 24px;
  text-align: center;
}
.phil16-dilemma-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.phil16-dilemma-btn {
  background: var(--phil16-bg-alt);
  border: 2px solid rgba(184, 70, 42, 0.25);
  border-radius: var(--phil16-radius);
  padding: 22px 18px;
  cursor: pointer;
  transition: all 0.25s var(--phil16-easing);
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 90px;
}
.phil16-dilemma-btn h3 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--phil16-ink);
  margin-bottom: 4px;
}
.phil16-dilemma-btn p {
  font-size: 0.85rem;
  color: var(--phil16-ink-soft);
  line-height: 1.45;
}
.phil16-dilemma-btn:hover {
  border-color: var(--phil16-russet);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--phil16-shadow);
}
.phil16-dilemma-btn.selected {
  border-color: var(--phil16-russet);
  background: rgba(184, 70, 42, 0.08);
  box-shadow: 0 4px 18px rgba(184, 70, 42, 0.2);
}

@media (max-width: 540px) {
  .phil16-dilemma-choices { grid-template-columns: 1fr; }
}

/* ── Slide nav buttons ── */
.phil16-slide-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.phil16-nav-btn {
  background: var(--phil16-russet);
  color: #fdf8ec;
  border: 0;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--phil16-easing);
}
.phil16-nav-btn:hover:not(:disabled) {
  background: var(--phil16-russet-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(184, 70, 42, 0.3);
}
.phil16-nav-btn:disabled {
  background: rgba(184, 70, 42, 0.3);
  cursor: not-allowed;
}
.phil16-nav-btn.back {
  background: transparent;
  color: var(--phil16-ink-soft);
  border: 1px solid rgba(91, 74, 58, 0.25);
}
.phil16-nav-btn.back:hover:not(:disabled) {
  background: rgba(91, 74, 58, 0.08);
  border-color: var(--phil16-ink-soft);
  color: var(--phil16-ink);
}

/* ════════════════════════════════════════════════════════════════════
   RESULTS PAGE
   ════════════════════════════════════════════════════════════════════ */
#phil16-results-container { display: none; }

.phil16-results-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

.phil16-results-sidebar {
  position: sticky;
  top: calc(var(--phil16-nav-h) + 28px);
  align-self: start;
}
.phil16-results-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 2px solid rgba(184, 70, 42, 0.18);
  padding-left: 14px;
}
.phil16-sidebar-link {
  display: block;
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--phil16-ink-mute);
  transition: color 0.25s, transform 0.25s var(--phil16-easing);
  position: relative;
}
.phil16-sidebar-link:hover { color: var(--phil16-russet); }
.phil16-sidebar-link.active {
  color: var(--phil16-russet);
  font-weight: 700;
  transform: translateX(3px);
}
.phil16-sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--phil16-russet);
  border-radius: 2px;
}

.phil16-results-mobile-nav { display: none; }
.phil16-results-mobile-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 12px;
  scrollbar-width: none;
}
.phil16-results-mobile-nav ul::-webkit-scrollbar { display: none; }
.phil16-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--phil16-ink-soft);
  background: var(--phil16-bg-alt);
  border: 1px solid rgba(184, 70, 42, 0.2);
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.phil16-pill.active {
  background: var(--phil16-russet);
  color: #fdf8ec;
  border-color: var(--phil16-russet);
}

.phil16-results-hero {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 24px;
}
.phil16-results-eyebrow {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--phil16-brass);
  margin-bottom: 8px;
}
.phil16-results-title {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  font-style: italic;
  color: var(--phil16-russet);
  margin-bottom: 10px;
}
.phil16-results-tagline {
  font-style: italic;
  color: var(--phil16-ink-soft);
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.phil16-results-mascot img {
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(184, 70, 42, 0.18));
}

.phil16-results-content { grid-column: 2; }

.phil16-section { margin-bottom: 50px; }
.phil16-section-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--phil16-brass);
  margin-bottom: 6px;
}
.phil16-section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  color: var(--phil16-russet);
  margin-bottom: 18px;
}

.phil16-prose-block,
.phil16-intro-block {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--phil16-ink);
}
.phil16-prose-block p,
.phil16-intro-block p { margin-bottom: 1em; }

.phil16-divider {
  border: 0;
  height: 1px;
  background: rgba(184, 70, 42, 0.18);
  margin: 36px 0;
}

.phil16-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.phil16-trait-card {
  background: var(--phil16-card);
  border: 1px solid rgba(184, 70, 42, 0.16);
  border-radius: var(--phil16-radius);
  padding: 18px 20px;
  box-shadow: 0 4px 14px var(--phil16-shadow);
  transition: transform 0.25s var(--phil16-easing), box-shadow 0.25s ease;
}
.phil16-trait-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px var(--phil16-shadow);
}
.phil16-trait-card h3 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  color: var(--phil16-russet);
  margin-bottom: 6px;
}
.phil16-trait-card p {
  font-size: 0.92rem;
  color: var(--phil16-ink-soft);
  line-height: 1.55;
}

.phil16-figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.phil16-figure-card {
  background: var(--phil16-bg-alt);
  border: 1px solid rgba(184, 70, 42, 0.16);
  border-radius: var(--phil16-radius);
  padding: 14px 16px;
}
.phil16-figure-name {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  color: var(--phil16-russet);
  margin-bottom: 4px;
}
.phil16-figure-note {
  font-size: 0.86rem;
  color: var(--phil16-ink-soft);
}

.phil16-axes-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.phil16-axis-row {
  background: var(--phil16-card);
  border: 1px solid rgba(184, 70, 42, 0.16);
  border-radius: var(--phil16-radius);
  padding: 18px 20px;
}
.phil16-axis-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: var(--phil16-ink-soft);
}
.phil16-axis-labels span:first-child  { font-weight: 700; color: var(--phil16-russet); }
.phil16-axis-labels span:nth-child(2) { font-style: italic; font-size: 0.78rem; }
.phil16-axis-labels span:last-child   { font-weight: 700; color: var(--phil16-russet); text-align: right; }
.phil16-axis-track {
  position: relative;
  height: 8px;
  background: rgba(184, 70, 42, 0.14);
  border-radius: 999px;
  overflow: hidden;
}
.phil16-axis-fill {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--phil16-russet), var(--phil16-brass));
  border-radius: 999px;
  transition: width 0.8s var(--phil16-easing);
}

.phil16-retake-wrap {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 30px;
}
.phil16-retake-btn {
  background: transparent;
  color: var(--phil16-russet);
  border: 2px solid var(--phil16-russet);
  padding: 14px 36px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--phil16-easing);
}
.phil16-retake-btn:hover {
  background: var(--phil16-russet);
  color: #fdf8ec;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(184, 70, 42, 0.3);
}

@media (max-width: 880px) {
  .phil16-results-page {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .phil16-results-sidebar { display: none; }
  .phil16-results-mobile-nav { display: block; }
  .phil16-results-hero, .phil16-results-content, .phil16-retake-wrap {
    grid-column: 1;
  }
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER  (now the same warm-cream family as the navbar, just a few
   shades darker — purple/aubergine retired)
   ════════════════════════════════════════════════════════════════════ */
.phil16-footer {
  background: var(--phil16-bg-deep);
  color: var(--phil16-ink-soft);
  padding: 36px 24px 28px;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid rgba(91, 74, 58, 0.22);
}
.phil16-footer-inner {
  max-width: 800px;
  margin: 0 auto;
}
.phil16-footer-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.phil16-footer-nav a {
  color: var(--phil16-russet);
  font-size: 0.86rem;
  padding: 4px 10px;
  transition: color 0.25s;
}
.phil16-footer-nav a:hover { color: var(--phil16-russet-dk); }
.phil16-footer-sep { color: rgba(91, 74, 58, 0.45); font-size: 0.86rem; padding: 0 4px; }
.phil16-footer-meta {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--phil16-ink-mute);
}

/* Pin to bottom on the landing only — once the quiz starts the footer
 * drops back to normal flow. */
html:not(.phil16-quiz-started) body.phil16-quiz-page .phil16-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  padding: 18px 24px 14px;
  margin-top: 0;
}

@media (max-width: 600px) {
  .phil16-footer { padding: 24px 18px 18px; }
}

/* ════════════════════════════════════════════════════════════════════
   ERROR / LOADING / SECTION REVEAL
   ════════════════════════════════════════════════════════════════════ */
.phil16-error {
  max-width: 640px;
  margin: 80px auto;
  padding: 28px 32px;
  background: #fbe6e0;
  border: 1px solid var(--phil16-russet-dk);
  border-radius: var(--phil16-radius);
  color: var(--phil16-russet-dk);
  text-align: center;
}
.phil16-error h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.phil16-section { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s var(--phil16-easing); }
.phil16-section.phil16-revealed { opacity: 1; transform: translateY(0); }
#phil16-intro { opacity: 1; transform: none; }

@media (max-width: 540px) {
  .phil16-likert-options { gap: 3px; }
  .phil16-likert-btn { min-width: 48px; padding: 4px 2px; }
  .phil16-likert-btn img { width: 36px; height: 36px; }
  .phil16-likert-label { font-size: 0.5rem; max-width: 46px; }
  .phil16-question-card { padding: 14px 16px; }
}