:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --accent: #c2562f;
  --gold: #e0a03a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .08);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}
a { color: var(--accent); }
a:hover { color: #a34726; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.top { padding: 16px 0; border-bottom: 1px solid rgba(43, 33, 24, .08); }
.top-row { display: flex; align-items: center; gap: 24px; }
.foot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  align-items: start;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}
.mark { width: 36px; height: 36px; display: block; }
.nav { margin-left: auto; display: flex; gap: 20px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: 48px; margin: 32px 0 12px; }
h2 { font-size: 28px; margin: 48px 0 12px; }
h3 { font-size: 22px; margin: 24px 0 8px; }
.lead { font-size: 18px; margin: 0 0 24px; max-width: 66ch; line-height: 1.65; }
.prose {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 16px;
  font-size: 17px;
  line-height: 1.7;
}
.prose p, .prose li { max-width: 66ch; }
.prose p { margin: 0 0 18px; }
.share-row { display: flex; align-items: center; gap: 12px; margin: 28px 0 48px; }
[data-gf-share-msg] { color: var(--muted); font-size: 14px; }
.btn {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn:hover { background: #a34726; color: #fff; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--accent);
}
.btn.ghost:hover { background: var(--card); color: var(--ink); }
.prose ol { list-style: none; padding: 0; margin: 16px 0 24px; counter-reset: step; }
.prose ol li {
  position: relative;
  padding-left: 48px;
  margin: 16px 0;
}
.prose ol li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
  color: var(--accent);
}
#how h3 {
  background: #fffdf9;
  border: 1px solid rgba(43, 33, 24, .10);
  border-left: 3px solid var(--accent);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 12px 16px 10px;
  margin: 30px 0 0;
}
#how h3 + p {
  background: #fffdf9;
  border: 1px solid rgba(43, 33, 24, .10);
  border-left: 3px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 0 16px 16px;
  margin: 0 0 24px;
  max-width: none;
}
.faq h3 {
  background: none;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  padding: 0 0 0 12px;
  margin: 28px 0 8px;
}
.faq h3 + p { background: none; border: 0; padding: 0; margin: 0 0 18px; }
.foot { padding: 56px 0 64px; margin-top: 72px; border-top: 1px solid rgba(43, 33, 24, .10); }
.foot p { margin: 0; }
.foot-group { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-label { font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.foot a { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 16px; white-space: nowrap; }
.foot a:hover { color: var(--accent); }
.fine { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid rgba(43, 33, 24, .10); color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: clamp(26px, 6.8vw, 30px); }
  h2 { font-size: 22px; }
  h3 { font-size: 20px; }
  .top { padding: 10px 0; }
  .top-row { flex-wrap: wrap; row-gap: 6px; }
  .foot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .brand { font-size: 19px; }
  .mark { width: 30px; height: 30px; }
  .nav {
    margin-left: 0;
    width: 100%;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 13px; padding: 8px 0; }
  .fine { margin-left: 0; }
  .prose { font-size: 16px; }
  .share-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}


.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
  font-size: 16px;
}
.prose th,
.prose td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(43, 33, 24, .12);
  vertical-align: top;
}
.prose th { font-weight: 600; font-size: 14px; }
@media (max-width: 640px) {
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 8px; }
}

.prose,
.prose p,
.prose li,
.prose td {
  font-family: var(--font-body);
}

[data-gf-tool="sins-test"] .ss .ss-prompt {
  line-height: 1.5;
  margin: 0 0 18px;
}
[data-gf-tool="sins-test"] .ss .ss-options {
  gap: 14px;
}
[data-gf-tool="sins-test"] .ss .ss-opt {
  line-height: 1.5;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
[data-gf-tool="sins-test"] .ss .ss-back,
[data-gf-tool="sins-test"] .ss .ss-again,
[data-gf-tool="sins-test"] .ss .ss-copy {
  min-height: 44px;
}


/* refinements: reading rhythm, touch targets */
.nav { gap: 8px; }
.nav a { padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(43, 33, 24, .05); }
.prose p { margin-bottom: 20px; }
.prose > p:first-of-type { font-size: 19px; line-height: 1.65; }
.share-row { margin: 32px 0 48px; }
@media (max-width: 640px) {
  .nav a { font-size: 13px; padding: 8px 10px; }
  #how h3 { padding: 14px 18px 10px; }
  #how h3 + p { padding: 0 18px 16px; }
  .prose > p:first-of-type { font-size: 17px; }
}


/* second pass: long-form rhythm */
.prose > p:first-of-type { margin-bottom: 32px; }
#how h3 { margin-top: 36px; }
#how h3 + p { line-height: 1.7; }

/* result sharing + shared-result page */
.share-row[hidden] { display: none; }
.share-msg { color: var(--muted); font-size: 14px; }
.saved-result {
  margin: 28px 0 24px;
  padding: 28px;
  background: var(--card);
  border: 1px solid rgba(43, 33, 24, .12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ss-saved-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.ss-saved-name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  color: var(--ink);
}
.ss-saved-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 16px;
}
.ss-saved-table caption {
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 8px;
}
.ss-saved-table th,
.ss-saved-table td {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(43, 33, 24, .12);
  text-align: left;
}
.ss-saved-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ss-saved-table tr.is-lead th { color: var(--accent); }
.ss-saved-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.ss-saved-cta { margin: 20px 0 0; }
.ss-saved-cta .btn { display: inline-flex; }
.ss-empty { color: var(--muted); }
@media (max-width: 640px) {
  .saved-result { padding: 18px; }
  .ss-saved-cta .btn { width: 100%; }
}

/* design pass — one axis, tighter mobile type, a share row with weight */
.wrap.sheet,
.wrap.prose { max-width: 720px; }
.prose h2 { margin-top: 52px; }
.prose h3 { margin-top: 28px; }
.prose li { margin: 6px 0; }
.share-row {
  align-items: center;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid rgba(43, 33, 24, .14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}
.share-row .btn {
  background: #9e4322;
  border-color: #9e4322;
  color: #fffaf2;
}
.share-row .btn:hover {
  background: #85371b;
  border-color: #85371b;
  color: #fffaf2;
}
.share-row .btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: rgba(194, 86, 47, .45);
}
.share-row .btn.ghost:hover {
  background: rgba(194, 86, 47, .08);
  color: var(--accent);
}
@media (max-width: 640px) {
  h1 { font-size: 32px; }
  .lead { font-size: 17px; line-height: 1.7; }
  .share-row { padding: 16px; }
  .share-row .btn { width: 100%; justify-content: center; }
}

/* design pass 2 — mobile nav breathing room, tappable options */
.ss-options button {
  min-height: 48px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.ss-options button:hover {
  background: rgba(224, 160, 58, .10);
}
@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; row-gap: 6px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 4px 16px; }
  .nav a { font-size: 15px; }
  .ss-options button { min-height: 52px; }
}


/* ---------- illustrations ---------- */
.hero-figure, .page-banner { margin: 0 0 24px; }
.hero-figure svg, .page-banner svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(43, 33, 24, .10);
}
.page-banner { max-width: 720px; }
@media (max-width: 640px) {
  .hero-figure { margin-bottom: 18px; }
}

/* ---------- per-sin marks ---------- */
#how h3 {
  position: relative;
  padding: 14px 18px 14px 58px;
}
#how h3::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--mark, none) center / contain no-repeat;
}
#how h3:nth-of-type(1) { --mark: var(--ic-pride); }
#how h3:nth-of-type(2) { --mark: var(--ic-greed); }
#how h3:nth-of-type(3) { --mark: var(--ic-lust); }
#how h3:nth-of-type(4) { --mark: var(--ic-envy); }
#how h3:nth-of-type(5) { --mark: var(--ic-gluttony); }
#how h3:nth-of-type(6) { --mark: var(--ic-wrath); }
#how h3:nth-of-type(7) { --mark: var(--ic-sloth); }

.prose table tbody tr:nth-child(1) { --mark: var(--ic-pride); }
.prose table tbody tr:nth-child(2) { --mark: var(--ic-greed); }
.prose table tbody tr:nth-child(3) { --mark: var(--ic-lust); }
.prose table tbody tr:nth-child(4) { --mark: var(--ic-envy); }
.prose table tbody tr:nth-child(5) { --mark: var(--ic-gluttony); }
.prose table tbody tr:nth-child(6) { --mark: var(--ic-wrath); }
.prose table tbody tr:nth-child(7) { --mark: var(--ic-sloth); }
.prose table td:first-child::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: -4px;
  background: var(--mark, none) center / contain no-repeat;
}
.prose table td:first-child { white-space: nowrap; }


/* ---------- sin marks (28px, legible at small sizes) ---------- */
:root {
  --ic-pride: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23f0e3cd'/><path d='M16 5c4 4 6 8 6 11a6 6 0 0 1-12 0c0-3 2-7 6-11z' fill='%23c2562f'/><path d='M16 9v12' stroke='%23fffaf2' stroke-width='1.8' stroke-linecap='round'/></svg>");
  --ic-greed: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23f6e7c6'/><path d='M9 16v5c0 1.7 3.1 3 7 3s7-1.3 7-3v-5' fill='none' stroke='%23b8791f' stroke-width='2'/><path d='M9 11v5c0 1.7 3.1 3 7 3s7-1.3 7-3v-5' fill='none' stroke='%23b8791f' stroke-width='2'/><ellipse cx='16' cy='11' rx='7' ry='3' fill='%23e0a03a'/></svg>");
  --ic-lust: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23f7ddd2'/><path d='M16 6c1 4 6 6 6 11a6 6 0 0 1-12 0c0-3 2-5 3-7 1 2 2 3 3 3 1-2 0-5 0-7z' fill='%23c2562f'/></svg>");
  --ic-envy: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23e6eee6'/><path d='M5 16c4-5 8-7 11-7s7 2 11 7c-4 5-8 7-11 7s-7-2-11-7z' fill='none' stroke='%234f7a5c' stroke-width='2'/><circle cx='16' cy='16' r='3.4' fill='%234f7a5c'/></svg>");
}

:root {
  --ic-gluttony: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23f0e3cd'/><path d='M10 10h12l-1.6 14.2A2 2 0 0 1 18.4 26h-4.8a2 2 0 0 1-2-1.8L10 10z' fill='%23c2562f'/><path d='M8 9c2-2 4 0 6-1s4 1 6 0 3 1 4 0' fill='none' stroke='%23e0a03a' stroke-width='2' stroke-linecap='round'/></svg>");
  --ic-wrath: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23f7ddd2'/><path d='M18 4l-8 14h5l-2 10 10-15h-5l2-9z' fill='%23c2562f'/></svg>");
  --ic-sloth: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><circle cx='16' cy='16' r='16' fill='%23efe9dd'/><path d='M11 6h10M11 26h10M12.5 6c0 5 3.5 6.5 3.5 10s-3.5 5-3.5 10M19.5 6c0 5-3.5 6.5-3.5 10s3.5 5 3.5 10' fill='none' stroke='%235c5346' stroke-width='1.9' stroke-linecap='round'/></svg>");
}


/* ---------- mobile: one-line nav, tighter first screen ---------- */
@media (max-width: 768px) {
  .top-row { flex-wrap: nowrap; gap: 12px; }
  .nav {
    flex-wrap: nowrap;
    gap: 16px;
    margin-left: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 15px; }
}
@media (max-width: 640px) {
  h1 { font-size: 30px; line-height: 1.15; margin: 20px 0 10px; }
  .hero-figure { margin-bottom: 14px; }
  .lead { font-size: 16.5px; line-height: 1.55; margin-bottom: 18px; }
  #how h3 { padding: 12px 14px 12px 52px; }
  #how h3::before { left: 14px; width: 26px; height: 26px; }
  .prose table td:first-child { white-space: normal; }
}


/* ---------- design pass 4 ---------- */
#how h3 { border-left: 4px solid var(--accent); }
@media (max-width: 768px) {
  .nav { gap: 10px; }
  .nav a { padding: 6px 8px; border-radius: 8px; }
}
@media (max-width: 640px) {
  h1 { font-size: 26px; letter-spacing: -0.02em; margin: 18px 0 16px; }
  .lead { max-width: 37ch; }
  .hero-figure { margin-bottom: 16px; }
}


/* ---------- design pass 5: mobile nav fits, wider prose, tighter tables ---------- */
.prose { max-width: 720px; }
h1, h2, h3 { text-wrap: balance; }
@media (max-width: 640px) {
  .nav { overflow: visible; gap: 4px; }
  .nav a { font-size: 14px; padding: 6px; }
  .nav a:nth-child(3) { display: none; }
  .prose { font-size: 17px; }
  .prose table { font-size: 15px; }
  .prose table th, .prose table td { padding: 8px; }
  .prose table td:first-child::before {
    width: 18px;
    height: 18px;
    vertical-align: top;
    margin-top: 3px;
  }
  .prose h2 { font-size: 24px; }
}


/* ---------- design pass 6: mobile tables become cards ---------- */
.prose p { margin-bottom: 1.6em; }
@media (max-width: 640px) {
  h1 { margin-top: 24px; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose table { border: 0; }
  .prose thead { display: none; }
  .prose tr {
    padding: 12px 14px;
    margin: 0 0 10px;
    border: 1px solid rgba(43, 33, 24, .12);
    border-radius: var(--radius);
    background: var(--card);
  }
  .prose td { padding: 0; border: 0; }
  .prose td:first-child { font-size: 17px; font-weight: 600; }
  .prose td + td { margin-top: 4px; font-size: 15px; color: var(--muted); }
}
