:root {
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --surface-alt: #F3EDE2;
  --text: #1B2420;
  --muted: #5A554C;
  --border: #E5DEC9;
  --primary: #1B2420;
  --accent: #D95D39;
  --sanguine: #D95D39;
  --choleric: #C58518;
  --melancholic: #3B597D;
  --phlegmatic: #367A68;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(27, 36, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 36, 32, 0.08);
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p {
  margin: 0 0 16px;
}

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: var(--card);
  padding: 8px 16px;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-link:hover {
  color: var(--text);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: var(--surface-alt);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}


.page-shell {
  padding-top: 16px;
  padding-bottom: 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

.tool-hero {
  margin-bottom: 16px;
}

.tool-h1 {
  margin-bottom: 8px;
}

.tool-subtitle {
  font-size: 16px;
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 8px;
}

.trust-strip {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 12px;
  margin: 0;
}

.quiz-stage {
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-head {
  margin-bottom: 24px;
}

.section-lead {
  color: var(--muted);
  max-width: 70ch;
  margin: 0;
}

.btn-primary,
.btn-outline,
.btn-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--card);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background: #2C3B34;
  border-color: #2C3B34;
  color: var(--card);
}

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.btn-subtle {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-subtle:hover {
  background: var(--border);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
}

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

.matrix-section {
  margin: 48px 0;
  padding: 32px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.matrix-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.matrix-card:hover {
  border-color: var(--text);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.matrix-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.matrix-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.matrix-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.matrix-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.matrix-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  flex: 1;
}

.matrix-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}


.editorial-monograph,
.post-article,
.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}

.editorial-prose p,
.editorial-prose li {
  max-width: 70ch;
  font-size: 16px;
  color: var(--text);
}

.editorial-prose h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.editorial-prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.editorial-prose h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}

.editorial-prose ul,
.editorial-prose ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.editorial-prose li {
  margin-bottom: 8px;
}

.editorial-prose blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.editorial-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.editorial-prose th,
.editorial-prose td {
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.editorial-prose th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text);
}

.faq-section {
  margin-bottom: 48px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: "\2212";
}

.faq-answer {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.faq-answer p {
  max-width: 70ch;
  margin: 0;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0 48px;
}

.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.guide-tag {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.guide-title {
  font-size: 22px;
  margin-bottom: 12px;
}

.guide-title a {
  text-decoration: none;
}

.guide-desc {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.guide-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.post-header,
.page-hero {
  margin-bottom: 24px;
}

.legal-updated {
  font-size: 14px;
  color: var(--muted);
}

.not-found-card {
  text-align: center;
}

.not-found-card .tool-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.not-found-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}


.engage-section {
  margin-top: 48px;
}

.engage-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.engage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.engage-like[data-gf-liked],
.engage-like[aria-pressed="true"] {
  background: var(--primary);
  color: var(--card);
  border-color: var(--primary);
}

.share-feedback,
.comment-status {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.comments-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.comments-sub {
  color: var(--muted);
  font-size: 14px;
  max-width: 70ch;
}

.comment-form {
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
}

.comment-form[data-gf-replying] .reply-banner {
  display: flex;
}

.form-row {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.field-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.comments-empty-hint {
  display: none;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.comments-list[data-gf-empty] .comments-empty-hint {
  display: block;
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-item[data-gf-owner] {
  background: var(--surface-alt);
  padding: 16px;
  border-radius: var(--radius);
  margin: 8px 0;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}

.owner-badge {
  background: var(--primary);
  color: var(--card);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.comment-time,
.reply-target {
  color: var(--muted);
  font-size: 12px;
}

.comment-body {
  margin: 0 0 8px;
  max-width: 70ch;
}

.comment-replies {
  padding-left: 24px;
  border-left: 2px solid var(--border);
  margin-top: 8px;
}

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  margin-bottom: 12px;
}

.footer-note,
.footer-disclaimer {
  font-size: 14px;
  color: var(--muted);
  max-width: 60ch;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-size: 14px;
  color: var(--muted);
}


.qz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.qz-shared-banner {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qz-shared-text {
  font-size: 14px;
  margin: 0;
}

.qz-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.qz-step-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.qz-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qz-mini-btn {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.qz-mini-btn:hover {
  background: var(--border);
}

.qz-progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.qz-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius);
  transition: width 0.2s ease;
}

.qz-statement {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 16px;
  min-height: 56px;
}

.qz-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.qz-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  min-height: 64px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.qz-opt:hover {
  background: var(--surface-alt);
  border-color: var(--text);
}

.qz-opt.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--card);
}

.qz-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.qz-opt.is-selected .qz-key {
  background: #2C3B34;
  border-color: #2C3B34;
  color: var(--card);
}

.qz-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.qz-key-hint {
  font-size: 12px;
  color: var(--muted);
}


.qz-res-banner {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.qz-res-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.qz-res-title {
  font-size: 28px;
  margin-bottom: 8px;
}

.qz-res-summary {
  color: var(--text);
  max-width: 70ch;
  margin-bottom: 16px;
}

.qz-res-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.qz-copy-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--phlegmatic);
}

.qz-res-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: center;
}

.qz-svg-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qz-svg-wrap svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.qz-bars-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qz-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qz-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.qz-bar-track {
  height: 12px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
}

.qz-bar-fill {
  height: 100%;
  border-radius: var(--radius);
}

.qz-ref-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 24px;
}

.qz-traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.qz-trait-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.qz-trait-box h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.qz-trait-box p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  h1, .tool-h1 { font-size: 28px; }
  h2, .qz-res-title { font-size: 22px; }
  h3, .qz-statement { font-size: 18px; }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .qz-card,
  .editorial-monograph,
  .post-article,
  .page-card,
  .comments-panel,
  .matrix-section {
    padding: 16px;
  }

  .qz-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .qz-opt {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    min-height: 48px;
    padding: 8px 12px;
    gap: 12px;
  }

  .qz-key-hint {
    display: none;
  }

  .matrix-grid,
  .guides-grid,
  .qz-res-visuals,
  .qz-traits-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .qz-res-actions .btn-primary,
  .qz-res-actions .btn-outline,
  .not-found-actions .btn-primary,
  .not-found-actions .btn-outline {
    width: 100%;
  }
}
