:root {
  --bg: #f3ebde;
  --card: #fbf7f0;
  --ink: #231a14;
  --muted: #6a5a4c;
  --primary: #8c1c2b;
  --primary-dk: #6e1220;
  --gold: #b3832a;
  --line: #e2d4bf;
  --r: 12px;
  --sh1: 0 1px 2px rgba(0, 0, 0, .06);
  --sh2: 0 8px 24px rgba(0, 0, 0, .08);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }
a { color: var(--primary); }
a:hover { color: var(--primary-dk); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.hd { border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 22px; }
.brand-mark { width: 28px; height: 28px; color: var(--primary); }
.hd-nav { display: flex; gap: 24px; }
.hd-nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; padding: 12px 0; }
.hd-nav a:hover { color: var(--primary); }

.hero { padding: 32px 0 64px; text-align: center; }
.hero h1 { font-size: 48px; }
.hero-meta { margin: 8px 0 24px; font-size: 14px; color: var(--muted); }
.tool-card { max-width: 860px; margin: 0 auto; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh2); padding: 32px; }

.sample h2, .diffs h2, .method h2 { font-size: 36px; margin-bottom: 12px; }
.sample-intro { margin: 0 0 24px; color: var(--muted); max-width: 70ch; }
.sample-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: start; }
.sample-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh1); padding: 24px; }
.ex-head { text-align: center; }
.ex-eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ex-name { margin: 0 0 4px; font-family: var(--serif); font-weight: 700; font-size: 36px; line-height: 1.2; color: var(--primary); }
.ex-line { margin: 0 auto; max-width: 44ch; }
.ex-chart svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 8px auto 0; }
.ex-c-star { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .35; }
.ex-c-ring, .ex-c-axis { fill: none; stroke: var(--line); stroke-width: 1; }
.ex-c-a { fill: rgba(140, 28, 43, .16); stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.ex-c-b { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.ex-c-dot { fill: var(--primary); }
.ex-c-label { font-family: var(--sans); font-size: 14px; font-weight: 600; fill: var(--ink); }
.ex-c-val { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.ex-legend { display: flex; gap: 24px; justify-content: center; font-size: 14px; font-weight: 600; }
.ex-legend span::before { content: ""; display: inline-block; width: 24px; vertical-align: middle; margin-right: 8px; border-top: 3px solid var(--primary); }
.ex-legend .ex-lb::before { border-top-style: dashed; border-top-color: var(--gold); }
.ex-bars { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.ex-bars li { display: grid; grid-template-columns: 80px 1fr 80px; gap: 12px; align-items: center; font-size: 14px; }
.ex-bn { font-weight: 600; }
.ex-bt { display: grid; gap: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.ex-bt i { display: block; height: 8px; border-radius: 4px; }
.ex-ba { background: var(--primary); }
.ex-bb { background: var(--gold); }
.ex-bv { text-align: right; font-variant-numeric: tabular-nums; }
.ex-bv em { font-style: normal; color: var(--muted); }
.ex-facts { margin: 24px 0 0; display: grid; gap: 12px; }
.ex-facts div { border-left: 2px solid var(--gold); padding-left: 12px; }
.ex-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ex-facts dd { margin: 4px 0 0; }
.sample-read h3 { font-size: 28px; margin-bottom: 16px; }
.sample-read ol { margin: 0 0 24px; padding-left: 24px; }
.sample-read li { margin-bottom: 12px; }
.sample-read strong { font-weight: 600; }
.btn-primary { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: var(--r); background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.diffs { padding-top: 64px; }
.diffs h2 { margin-bottom: 24px; }
.diffs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--primary); }
.diffs-list li { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.diffs-list li:nth-child(even) { padding: 24px 0 24px 24px; border-left: 1px solid var(--line); }
.diffs-list h3 { font-size: 22px; margin-bottom: 8px; }
.diffs-list p { margin: 0; }

.method { padding-top: 64px; }
.method h2 { margin-bottom: 24px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.method h3 { font-size: 22px; margin-bottom: 12px; }
.method-built p { margin: 0 0 12px; max-width: 70ch; }
.method-formula { font-variant-numeric: tabular-nums; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.method-limits { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r); padding: 24px; }
.method-limits ul { margin: 0; padding-left: 20px; }
.method-limits li { margin-bottom: 12px; }
.method-limits li:last-child { margin-bottom: 0; }
.method-limits strong { font-weight: 600; }

.prose { max-width: 760px; }
.prose h2 { font-size: 36px; margin: 48px 0 16px; }
.prose h3 { font-size: 22px; margin: 32px 0 12px; }
.prose p, .prose li { max-width: 70ch; }
.prose ul { padding-left: 24px; }
.prose ol { list-style: none; padding: 0; counter-reset: step; }
.prose ol li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 16px; }
.prose ol li::before { content: counter(step, upper-roman); position: absolute; left: 0; top: -4px; font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.2; color: var(--gold); width: 40px; }
.prose strong { font-weight: 600; }

.sins { padding-top: 64px; }
.sins h2, .history h2, .faq h2 { font-size: 36px; margin-bottom: 24px; }
.sins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sin { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--sh1); }
.sin:first-child { grid-column: 1 / -1; border-color: var(--primary); }
.sin-num { font-family: var(--serif); font-weight: 700; font-size: 36px; line-height: 1.2; color: var(--gold); }
.sin h3 { font-size: 28px; }
.sin-virtue { margin: 4px 0 8px; font-size: 14px; font-weight: 600; color: var(--primary); }
.sin p { margin: 0; }
.sin p + p { margin-top: 0; }

.history { padding-top: 64px; max-width: 1120px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--line); max-width: 760px; }
.timeline li { position: relative; padding: 0 0 24px 16px; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); }
.tl-when { display: block; font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--primary); }
.timeline p { margin: 4px 0 0; max-width: 70ch; }

.faq { padding: 64px 24px; }
.faq-list { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-size: 18px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font-size: 22px; color: var(--primary); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.faq details p { margin: 0 0 16px; max-width: 70ch; }

.wrap.sins-reference { max-width: 760px; padding-block: 48px 64px; }
.sins-reference-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}
.sins-reference h1 { font-size: clamp(32px, 5vw, 48px); }
.sins-reference h2 { font-size: clamp(28px, 4vw, 36px); margin: 48px 0 16px; }
.sins-reference .faq, .sins-reference .history { padding: 0; }
.sins-reference-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}
.sins-reference-table:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sins-reference-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.sins-reference-table th, .sins-reference-table td { text-align: left; vertical-align: top; padding: 12px; }
.sins-reference-table thead { background: var(--bg); }
.sins-reference-table tbody tr { border-top: 1px solid var(--line); }

.legal { padding-top: 48px; padding-bottom: 64px; }
.legal h1 { font-size: 48px; }
.legal-date { color: var(--muted); font-size: 14px; }

.ft { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
.ft-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ft-brand { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); }
.ft-nav { display: flex; gap: 16px; }
.ft-nav a { color: var(--ink); }
.ft-note { margin: 0; flex-basis: 100%; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hd-nav { gap: 16px; }
  .brand { font-size: 18px; }
  .hero { padding: 24px 0 48px; }
  .hero h1, .legal h1 { font-size: 32px; }
  .tool-card { padding: 24px 16px; }
  .prose h2, .sins h2, .history h2, .faq h2 { font-size: 28px; }
  .sins-grid { grid-template-columns: 1fr; }
  .sample h2, .diffs h2, .method h2 { font-size: 28px; }
  .sample-grid, .method-grid, .diffs-list { grid-template-columns: 1fr; gap: 24px; }
  .diffs-list { gap: 0; }
  .diffs-list li, .diffs-list li:nth-child(even) { padding: 16px 0; border-left: 0; }
  .sample-card { padding: 16px; }
  .ex-name { font-size: 28px; }
  .ex-bars li { grid-template-columns: 68px 1fr 68px; gap: 8px; }
  .btn-primary { width: 100%; justify-content: center; }
  .sin { grid-template-columns: 40px 1fr; padding: 16px; }
  .sin-num { font-size: 28px; }
  .sin h3 { font-size: 22px; }
  .faq { padding: 48px 16px; }
}