/* ========================================================================== 
   Quizmilo — Mobile-First Design System
   Target Viewports: 360px, 390px, 430px, 768px+ (Tablet), 1024px+ (Desktop)

   Direction: playful & bold, paper-and-ink, hard "sticker" shadows.
   Deliberately not dark-mode-glass-gradient — see PRODUCT.md anti-references.
   ========================================================================== */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-500-700.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-400-700.woff2") format("woff2");
}

:root {
  /* Surfaces */
  --bg: oklch(95% 0.022 78);
  --surface: oklch(99% 0.008 85);
  --surface-sunken: oklch(91.5% 0.022 74);
  --dot: color-mix(in oklch, var(--ink) 9%, transparent);

  /* Ink (text) */
  --ink: oklch(21% 0.03 40);
  --ink-soft: oklch(42% 0.026 44);
  --ink-faint: oklch(58% 0.018 48);
  --on-accent: oklch(98% 0.012 85);

  /* Brand palette — coral carries the brand, violet + gold rotate as flavor accents */
  --coral: oklch(53% 0.185 35);
  --coral-deep: oklch(44% 0.175 33);
  --violet: oklch(48% 0.175 306);
  --violet-deep: oklch(40% 0.165 305);
  --gold: oklch(78% 0.15 88);
  --gold-deep: oklch(68% 0.15 80);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-offset-sm: 3px;
  --shadow-offset-md: 5px;
  --shadow-offset-lg: 7px;

  --font-display: "Fredoka", sans-serif;
  --font-body: "Hanken Grotesk", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.25s var(--ease-out);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.6px);
  background-size: 24px 24px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header & Brand */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2.5px solid var(--ink);
  padding: 0.85rem 1rem;
}

.header-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.brand-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(-3deg);
}

/* Main Layout */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

/* Typography & Clamp */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-section {
  margin-bottom: 2.25rem;
}

.hero-title {
  font-size: clamp(2.3rem, 8vw, 3.6rem);
  margin-bottom: 0.6rem;
}

.hero-title .mark {
  position: relative;
  z-index: 0;
  color: var(--ink);
  white-space: nowrap;
}

.hero-title .mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.1em;
  right: -0.12em;
  bottom: 0.02em;
  height: 0.4em;
  background: var(--gold);
  transform: rotate(-1.6deg);
  border-radius: 3px;
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* Quiz Card Grid (Homepage) */
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.quiz-card {
  --card-accent: var(--coral);
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-offset-md) var(--shadow-offset-md) 0 var(--ink);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.quiz-grid .quiz-card:nth-of-type(odd) {
  transform: rotate(-0.65deg);
}

.quiz-grid .quiz-card:nth-of-type(even) {
  transform: rotate(0.65deg);
}

.quiz-grid .quiz-card:nth-of-type(3n+2) {
  --card-accent: var(--violet);
}

.quiz-grid .quiz-card:nth-of-type(3n) {
  --card-accent: var(--gold-deep);
}

.quiz-card:hover {
  transform: translate(-3px, -3px) rotate(0deg);
  box-shadow: var(--shadow-offset-lg) var(--shadow-offset-lg) 0 var(--card-accent);
}

.quiz-cluster {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: color-mix(in oklch, var(--card-accent) 22%, var(--surface));
  border: 1.5px solid var(--card-accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.quiz-title {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin-bottom: 0.6rem;
}

.quiz-desc {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  line-height: 1.5;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2.5px solid var(--ink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-offset-sm) var(--shadow-offset-sm) 0 var(--ink);
}

.btn-primary {
  background: var(--coral);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--coral-deep);
  transform: translate(-2px, -2px);
  box-shadow: calc(var(--shadow-offset-sm) + 2px) calc(var(--shadow-offset-sm) + 2px) 0 var(--ink);
}

.btn-primary:active {
  transform: translate(var(--shadow-offset-sm), var(--shadow-offset-sm));
  box-shadow: 0 0 0 var(--ink);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--surface-sunken);
  transform: translate(-2px, -2px);
  box-shadow: calc(var(--shadow-offset-sm) + 2px) calc(var(--shadow-offset-sm) + 2px) 0 var(--ink);
}

.btn-secondary:active {
  transform: translate(var(--shadow-offset-sm), var(--shadow-offset-sm));
  box-shadow: 0 0 0 var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-width: 2px;
  box-shadow: none;
}

.btn-outline:hover {
  background: color-mix(in oklch, var(--gold) 35%, var(--surface));
}

.btn-large {
  min-height: 54px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  border-width: 2px;
}

/* Quiz Page Container & Intro */
.quiz-intro-card, .quiz-question-card, .quiz-result-card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  box-shadow: var(--shadow-offset-lg) var(--shadow-offset-lg) 0 var(--ink);
}

@media (min-width: 768px) {
  .quiz-intro-card, .quiz-question-card, .quiz-result-card {
    padding: 2.5rem 2rem;
  }
}

.quiz-cluster-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.06em;
  background: color-mix(in oklch, var(--gold) 45%, var(--surface));
  border: 1.5px solid var(--ink);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.9rem;
  transform: rotate(-2deg);
}

.quiz-main-title {
  font-size: clamp(1.6rem, 5.5vw, 2.3rem);
  margin-bottom: 0.75rem;
}

.quiz-short-desc {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.quiz-intro-box {
  background: var(--surface-sunken);
  border: 1.5px dashed var(--ink-faint);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 2rem;
}

.quiz-intro-text {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Question Progress & Navigation */
.quiz-progress-wrapper {
  margin-bottom: 1.75rem;
}

.progress-bar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.btn-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-back:hover {
  color: var(--ink);
}

.back-placeholder {
  display: inline-block;
  min-width: 64px;
}

.progress-counter {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.progress-counter strong {
  color: var(--coral-deep);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--surface-sunken);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease-out);
}

/* Question & Answer Options */
.question-text {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.answers-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-answer-option {
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1.15rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-answer-option:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-answer-option.selected {
  background: color-mix(in oklch, var(--coral) 14%, var(--surface));
  border-color: var(--coral);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--coral);
}

.answer-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-sunken);
  border: 1.5px solid var(--ink);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-answer-option.selected .answer-badge {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--on-accent);
}

.answer-label {
  line-height: 1.45;
  flex: 1;
}

/* Result Screen */
.result-header-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--coral-deep);
  margin-bottom: 0.4rem;
}

.result-title {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.result-summary {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  line-height: 1.45;
}

.result-persona-label {
  display: inline-flex;
  margin: 0 0 0.7rem;
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.result-image-box {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-offset-md) var(--shadow-offset-md) 0 var(--gold);
}

.result-photo-box {
  display: grid;
  place-items: center;
  background: var(--surface-sunken);
  padding: clamp(0.5rem, 1.8vw, 1rem);
}

.result-share-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.result-photo {
  width: auto;
  max-width: 100%;
  max-height: min(72svh, 45rem);
  object-fit: contain;
}

.result-desc-box {
  background: var(--surface-sunken);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1.5px solid var(--ink);
  margin-bottom: 1.75rem;
}

.quiz-start-actions {
  margin: 1.5rem 0 2rem;
}

.quiz-start-actions-primary {
  padding: 1.25rem;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: color-mix(in oklch, var(--gold) 15%, var(--surface));
}

.publisher-ad-seam {
  min-height: 0;
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 1.5px dashed var(--ink-faint);
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
}

.result-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--violet) 10%, var(--surface));
  box-shadow: 3px 3px 0 var(--violet);
}

.result-stat:nth-child(2) {
  background: color-mix(in oklch, var(--gold) 22%, var(--surface));
  box-shadow: 3px 3px 0 var(--gold-deep);
}

.result-stat:nth-child(3) {
  background: color-mix(in oklch, var(--coral) 10%, var(--surface));
  box-shadow: 3px 3px 0 var(--coral);
}

.result-stat-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.result-stat-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
}

@media (min-width: 700px) {
  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .result-stat {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
  }

  .result-stat-value {
    text-align: left;
  }
}

.result-description {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* Publisher editorial fields remain visually secondary to each page title,
   while keeping authored content readable when it is added after review. */
.publisher-lead {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.65;
}

.publisher-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.publisher-author {
  color: var(--ink);
  font-weight: 700;
}

.publisher-reviewer {
  color: var(--ink-soft);
  font-weight: 600;
}

.publisher-editorial-content {
  margin: 1.5rem 0;
}

.editorial-body p {
  max-width: 68ch;
  margin: 0;
}

.editorial-body p + p {
  margin-top: 1rem;
}

.editorial-section + .editorial-section {
  margin-top: 1.5rem;
}

.editorial-heading {
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.editorial-body {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.result-immediate-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 1.75rem 0 2.5rem;
  padding: 1.15rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--violet) 9%, var(--surface));
}

.result-explanation {
  margin: 0 0 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}

.result-explained-heading {
  margin: 0 0 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2rem);
}

@media (min-width: 640px) {
  .result-immediate-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.share-actions-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 -0.25rem;
}

.social-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.social-share-btn {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: 700 0.92rem/1 var(--font-body);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  touch-action: manipulation;
}

.social-share-btn:hover,
.social-share-btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.social-share-facebook { background: oklch(0.79 0.11 248); }
.social-share-whatsapp { background: oklch(0.83 0.12 150); }
.social-share-x { background: oklch(0.91 0.01 260); }
.social-share-telegram { background: oklch(0.84 0.08 230); }

/* Related Quizzes Section */
.related-quizzes-section {
  border-top: 2.5px dashed var(--ink-faint);
  padding-top: 2rem;
}

.related-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-card {
  --card-accent: var(--violet);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-offset-sm) var(--shadow-offset-sm) 0 var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.related-grid .related-card:nth-of-type(even) {
  --card-accent: var(--gold-deep);
}

.related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: calc(var(--shadow-offset-sm) + 2px) calc(var(--shadow-offset-sm) + 2px) 0 var(--card-accent);
}

.related-cluster {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in oklch, var(--card-accent) 20%, var(--surface));
  border: 1.5px solid var(--card-accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.related-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.related-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  flex: 1;
}

.related-link {
  align-self: flex-start;
}

/* Registry-driven links between a quiz landing and its result profiles. */
.result-profile-directory {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: color-mix(in oklch, var(--violet) 8%, var(--surface));
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-offset-sm) var(--shadow-offset-sm) 0 var(--violet);
}

.result-profile-directory-compact {
  margin-top: 2.5rem;
}

.result-profile-directory-copy {
  max-width: 42rem;
  margin-bottom: 1rem;
}

.result-profile-directory-copy h2 {
  margin: 0.25rem 0 0.4rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.result-profile-directory-copy p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.result-profile-directory-kicker {
  color: var(--violet-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.result-profile-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-profile-link {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.result-profile-link:hover,
.result-profile-link:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--violet);
}

.result-profile-link span {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
}

.result-profile-link small,
.quiz-landing-back-link {
  color: var(--violet-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 599px) {
  .result-profile-link-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--on-accent);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  pointer-events: none;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  padding: 2.25rem 1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  border-top: 2.5px solid var(--ink);
  background: color-mix(in oklch, var(--gold) 18%, var(--bg));
}

.footer-container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 1.15rem;
}

.footer-brand {
  width: fit-content;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.footer-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font: 600 0.875rem/1.3 var(--font-body);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.footer-link:hover {
  color: var(--ink);
}

.footer-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.footer-copy {
  color: var(--ink-soft);
}

/* Legal and trust pages */
.legal-main {
  max-width: 1040px;
  padding-top: clamp(2rem, 7vw, 4.5rem);
}

.legal-hero {
  max-width: 760px;
  margin-bottom: clamp(2.25rem, 7vw, 4rem);
}

.legal-title {
  max-width: 13ch;
  margin-bottom: 0.8rem;
  font-size: clamp(2.4rem, 9vw, 5rem);
  letter-spacing: -0.035em;
}

.legal-summary {
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.55;
}

.legal-updated {
  width: fit-content;
  margin-top: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.legal-layout {
  display: grid;
  gap: 2.5rem;
}

.legal-toc {
  align-self: start;
  padding: 1.1rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.legal-toc-title {
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.legal-toc-list {
  display: flex;
  gap: 0.8rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.legal-toc-list li {
  flex: 0 0 auto;
}

.legal-toc a {
  min-height: 40px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.legal-toc a:hover {
  color: var(--coral-deep);
}

.legal-content {
  min-width: 0;
}

.legal-section {
  padding: 0 0 clamp(2rem, 6vw, 3.5rem);
  scroll-margin-top: 6rem;
}

.legal-section + .legal-section {
  padding-top: clamp(2rem, 6vw, 3.5rem);
  border-top: 1.5px dashed var(--ink-faint);
}

.legal-section h2 {
  max-width: 24ch;
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.legal-section h3 {
  margin: 1.8rem 0 0.65rem;
  font-size: 1.15rem;
}

.legal-section p,
.legal-section ul,
.legal-section ol,
.legal-section dl {
  max-width: 72ch;
  color: var(--ink-soft);
}

.legal-section p + p,
.legal-section p + ul,
.legal-section p + ol,
.legal-section ul + p,
.legal-section ol + p,
.legal-section dl + p {
  margin-top: 1rem;
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.35rem;
}

.legal-section li + li {
  margin-top: 0.55rem;
}

.legal-section a,
.contact-link {
  color: var(--coral-deep);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.legal-section strong {
  color: var(--ink);
}

.legal-section address {
  max-width: 72ch;
  color: var(--ink-soft);
  font-style: normal;
  line-height: 1.7;
}

.legal-section code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-sunken);
  color: var(--ink);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.cookie-list {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.cookie-list dt {
  padding: 1rem 0 0.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.cookie-list dd {
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--ink-faint);
  color: var(--ink-soft);
}

/* Transitional consent surface. Google Privacy & Messaging replaces this
   first-party fallback when the certified CMP is configured. */
.consent-fallback {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: end center;
  padding: 0.75rem;
}

.consent-fallback[hidden] {
  display: none !important;
}

.consent-fallback__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklch, var(--ink) 72%, transparent);
}

.consent-fallback__dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100svh - 1.5rem);
  overflow: auto;
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-offset-md) var(--shadow-offset-md) 0 var(--gold);
}

.consent-fallback__eyebrow {
  width: fit-content;
  margin-bottom: 0.7rem;
  padding: 0.22rem 0.55rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.consent-fallback__title {
  max-width: 20ch;
  margin-bottom: 0.65rem;
  font-size: clamp(1.55rem, 6vw, 2.25rem);
}

.consent-fallback__copy {
  max-width: 62ch;
  color: var(--ink-soft);
}

.consent-fallback__actions {
  display: grid !important;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.consent-fallback__button {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--gold) 32%, var(--surface));
  color: var(--ink);
  font: 700 0.95rem/1.2 var(--font-body);
  box-shadow: var(--shadow-offset-sm) var(--shadow-offset-sm) 0 var(--ink);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.consent-fallback__button:hover {
  background: var(--gold);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.consent-fallback__button:active {
  transform: translate(var(--shadow-offset-sm), var(--shadow-offset-sm));
  box-shadow: none;
}

.consent-fallback__button--accept,
.consent-fallback__button--reject,
.consent-fallback__button--manage {
  background: color-mix(in oklch, var(--gold) 32%, var(--surface));
}

.consent-fallback__button--secondary {
  background: var(--surface);
  box-shadow: none;
}

.consent-fallback__details {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--ink-faint);
}

.consent-fallback__purpose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1rem;
  align-items: center;
  padding: 0.9rem 0;
}

.consent-fallback__purpose + .consent-fallback__purpose {
  border-top: 1px solid var(--surface-sunken);
}

.consent-fallback__purpose-copy {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.consent-fallback__status {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.consent-fallback__toggle {
  width: 48px;
  min-width: 48px;
  height: 28px;
  accent-color: var(--coral-deep);
  cursor: pointer;
}

.consent-fallback__toggle:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.consent-fallback__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  font: 700 1.25rem/1 var(--font-body);
  cursor: pointer;
}

.consent-fallback__close:hover {
  background: var(--surface-sunken);
}

@media (min-width: 640px) {
  .consent-fallback {
    place-items: center;
    padding: 1.5rem;
  }

  .consent-fallback__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.legal-callout {
  max-width: 72ch;
  margin: 1.35rem 0;
  padding: 1.15rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--gold) 25%, var(--surface));
  box-shadow: 3px 3px 0 var(--ink);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.legal-meta-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.65rem 1rem;
}

.legal-meta-list dt {
  color: var(--ink);
  font-weight: 700;
}

.legal-meta-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .footer-container {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer-nav {
    justify-content: flex-end;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }

  .legal-layout {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
  }

  .legal-toc {
    position: sticky;
    top: 5.5rem;
  }

  .legal-toc-list {
    display: grid;
    gap: 0.25rem;
    overflow: visible;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.35s var(--ease-out) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .quiz-grid .quiz-card:nth-of-type(odd),
  .quiz-grid .quiz-card:nth-of-type(even) {
    transform: none;
  }
}

/* 404 Error State */
.error-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-offset-md) var(--shadow-offset-md) 0 var(--ink);
}

.error-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--coral-deep);
}

.error-msg {
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
