/* Deadly Vice — theme stylesheet
   Palette: bg #151114 / surface #251B23 / text #F2E8D8 / muted #BFB0A6 / rose #BA8496 / old gold #D3B47D
   Type: Georgia/Times serif for display, system-ui for UI. No external fonts. */

:root {
  --bg: #151114;
  --surface: #251B23;
  --surface-2: #2E222B;
  --text: #F2E8D8;
  --muted: #BFB0A6;
  --rose: #BA8496;
  --gold: #D3B47D;
  --line: rgba(211, 180, 125, 0.22);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .hero-kicker, .sin-roman, .result-percent {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 0.8em; }
h3 { font-size: 1.15rem; margin: 0 0 0.35em; }

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--rose); }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

p { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(21, 17, 20, 0.92);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-mark {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 1.15rem; color: var(--text); }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--gold); }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.2rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
}
.hero-kicker {
  color: var(--gold);
  text-transform: uppercase;

  letter-spacing: 0.35em;
  font-size: 0.8rem;
  margin: 0 0 0.6rem;
}
.hero h1 { margin: 0 0 0.5rem; }
.hero-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.2rem; }
.hero-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  padding: 0;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-meta li { display: flex; align-items: center; gap: 0.4rem; }
.hero-meta li::before { content: "·"; color: var(--gold); font-weight: 700; }
.hero-art { display: flex; justify-content: center; }
.hero-art img, .hero-art svg { max-width: 100%; height: auto; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn-primary:hover { background: var(--rose); color: var(--bg); }

/* ---------- ad slots (fixed height, never push the start button) ---------- */
.ad-slot {
  min-height: 90px;
  max-width: 100%;
  margin: 1rem 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
}
.ad-quiz-intro { min-height: 60px; margin: 0 0 1rem; }
.ad-slot:empty { display: none; }
body.dv-quiz-active .ad-slot { display: none; }

/* ---------- generic page ---------- */
.page-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 3rem;
}
.page h1 { margin: 0 0 1rem; }
.page h2 { margin-top: 2.2rem; }
.page ul { max-width: var(--measure); }
.page li { margin-bottom: 0.6rem; }

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--gold); }

.related-guides { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* ---------- quiz ---------- */
.quiz-section { border-bottom: 1px solid var(--line); }
.quiz-mount {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.2rem 3rem;
}
.quiz-paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem clamp(1.2rem, 4vw, 2.6rem);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}
.quiz-progress .bar {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  margin-left: 1rem;
  overflow: hidden;
}
.quiz-progress .bar > span { display: block; height: 100%; background: var(--gold); width: 0; }

.quiz-prompt { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.6rem; }
.quiz-question {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.4vw, 1.55rem);
  line-height: 1.35;
  margin: 0 0 1.4rem;
}
.quiz-options { display: grid; gap: 0.7rem; margin: 0 0 1.4rem; }
.quiz-option {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.65rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.quiz-option:hover { border-color: var(--gold); }
.quiz-option[aria-checked="true"] {
  border-color: var(--gold);
  background: rgba(211, 180, 125, 0.14);
}
.quiz-nav { display: flex; justify-content: space-between; gap: 1rem; }
.quiz-nav .btn-back {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 48px;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.quiz-nav .btn-back:hover { color: var(--text); border-color: var(--muted); }
.quiz-nav .btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.quiz-note { color: var(--muted); font-size: 0.85rem; margin-top: 1.2rem; }
.quiz-intro-copy p:first-child { margin-top: 0; }

/* ---------- home content sections ---------- */
.result-guide, .intro-block, .duo { border-bottom: 1px solid var(--line); }
.sins-index .page-inner { max-width: 860px; }
.sin-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}
.sin-roman { color: var(--gold); font-size: 1.4rem; line-height: 1.4; }
.sin-row h3 a { color: var(--text); text-decoration: none; }
.sin-row h3 a:hover { color: var(--gold); }
.sin-row p { margin: 0; color: var(--muted); }

.duo-grid {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.duo-col p { color: var(--muted); }

.faq { border-bottom: 1px solid var(--line); }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.05rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.faq-item p { color: var(--muted); margin: 0.4rem 0 0.6rem; }

.disclaimer { color: var(--muted); font-size: 0.9rem; }
.disclaimer .page-inner { padding-bottom: 2rem; }

/* ---------- result ---------- */
.result-mount .result-top {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 2rem;
}
.result-top h2 { margin: 0 0 0.4rem; }
.result-top .close-call { color: var(--rose); font-size: 0.9rem; margin-bottom: 0; }
.result-bars { display: grid; gap: 0.9rem; margin: 1.6rem 0; }
.result-bar-row {
  display: grid;

  grid-template-columns: 6.5rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.8rem;
}
.result-bar-row .dim-name { font-family: var(--serif); }
.result-bar-row.is-top .dim-name { color: var(--gold); }
.result-bar-track {
  height: 14px;
  background: var(--surface-2);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}
.result-bar-fill { height: 100%; background: var(--rose); border-radius: 7px; }
.result-bar-row.is-top .result-bar-fill { background: var(--gold); }
.result-bar-fill.friend { background: var(--muted); opacity: 0.55; margin-top: 4px; }
.result-percent { text-align: right; font-size: 1rem; }
.bar-legend { display: flex; gap: 1.2rem; font-size: 0.85rem; color: var(--muted); }
.bar-legend span::before {
  content: "";
  display: inline-block;
  width: 0.8rem; height: 0.8rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: -0.1em;
}
.bar-legend .legend-you::before { background: var(--rose); }
.bar-legend .legend-friend::before { background: var(--muted); opacity: 0.55; }
.compare-summary { color: var(--muted); }
.interpretation { border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: 1.6rem; }
.interpretation h3 { color: var(--gold); }
.interpretation .boundary { color: var(--muted); font-size: 0.92rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 0.6rem; }
.share-row button, .share-row a.btn-primary { min-height: 48px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover { color: var(--rose); border-color: var(--rose); }
.share-fallback { width: 100%; margin-top: 0.8rem; }
.share-fallback input {
  width: 100%;
  padding: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
}
.friend-banner {
  background: var(--surface);
  border: 1px solid var(--rose);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}
.result-state { text-align: left; }
.result-state h2 { margin-bottom: 0.4rem; }
.clear-data { margin-top: 2.5rem; }
.clear-data button {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
}
.upgrade-hook {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-top: 2.5rem;
  text-align: center;
  pointer-events: none;
}

.upgrade-hook-title { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 0.3rem; }
.upgrade-hook-note {
  display: inline-block;
  color: var(--bg);
  background: var(--muted);
  border-radius: 999px;
  padding: 0.1rem 0.8rem;
  font-size: 0.78rem;
  margin: 0;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1.2rem 2.4rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: 0.8rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--gold); }
.footer-note { color: var(--muted); font-size: 0.8rem; max-width: none; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 1.4rem; }
  .hero-art { order: 0; }
  .hero-art img, .hero-art svg { max-width: 200px; }
  .duo-grid { grid-template-columns: 1fr; }
  .result-bar-row { grid-template-columns: 5.2rem minmax(0, 1fr) 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.compare-table { width:100%; border-collapse:collapse; margin:1.5rem 0; font-size:.9rem; }
.compare-table caption { text-align:left; color:var(--gold); margin-bottom:.6rem; }
.compare-table th,.compare-table td { text-align:left; padding:.5rem; border-bottom:1px solid var(--line); }
