:root {
  --bg-canvas: #fbf1f0;
  --bg-surface: rgba(255, 250, 248, 0.86);
  --bg-surface-solid: #fffaf8;
  --bg-surface-hover: rgba(107, 33, 85, 0.07);
  --bg-plum-tint: #f3e1e6;
  --text-primary: #1c1917;
  --text-muted: #574b4f;
  --accent-primary: #6b2155;
  --accent-secondary: #9b3b76;
  --border-subtle: rgba(107, 33, 85, 0.24);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(28, 25, 23, 0.12);
  --glow-accent: 0 0 24px -4px rgba(107, 33, 85, 0.3);
  --glass-backdrop: blur(16px) saturate(180%);
}
*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: Charter, Cambria, Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  font-variant-numeric: lining-nums tabular-nums;
  overflow-wrap: anywhere;
  hyphens: auto;
}
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.15rem 0; }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.25s var(--ease-kinetic); }
.sc-label {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-primary);
  display: inline-block;
  margin-bottom: 0.4rem;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: 70ch; margin: 0 auto; }

/* Header - Strictly Static/Relative, Left Brand, Second Row Nav */
.site-header {
  position: relative;
  background: var(--bg-surface-solid);
  border-bottom: 2px solid var(--accent-primary);
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  color: var(--bg-surface-solid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid var(--text-primary);
}
.header-nav-row {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-plum-tint);
}
.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: center;
}
.main-nav a {
  padding: 0.75rem 0;
  color: var(--text-primary);
  font-size: 0.96rem;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}
.main-nav a::after, .text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.35rem;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-kinetic);
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after, .text-link:hover::after {
  transform: scaleX(1);
}
.mobile-dots-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

/* Buttons & Links */
.btn-plum {
  display: inline-block;
  background: var(--accent-primary);
  color: #fffaf8;
  padding: 0.8rem 1.6rem;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.98rem;
  border: 1px solid var(--accent-primary);
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic), background 0.3s ease;
}
.btn-plum:hover {
  background: #4e163d;
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.text-link {
  position: relative;
  display: inline-block;
  font-weight: 700;
  color: var(--accent-primary);
  padding-bottom: 0.2rem;
}
.text-link::after { bottom: 0; }

/* Sections & Diagonal Joins */
.section-block { padding: 4rem 0; position: relative; }
.section-diagonal {
  background: linear-gradient(135deg, var(--bg-plum-tint) 0%, #f7e6ea 100%);
  clip-path: polygon(0 32px, 100% 0, 100% calc(100% - 32px), 0 100%);
  padding: 5.5rem 0;
  margin: 1rem 0;
}

/* Hero Lead & Overlapping Flat Vector Stack */
.lead-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.lead-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
}
.hero-illustration-stack {
  position: relative;
  min-height: 410px;
  background: var(--bg-plum-tint);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
}
.overlap-card {
  position: absolute;
  background: var(--bg-surface-solid);
  border: 2px solid var(--accent-primary);
  padding: 0.65rem;
  box-shadow: var(--shadow-elevation);
  width: 62%;
}
.overlap-card img {
  width: 100%;
  height: 115px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-subtle);
  background: #f5dfe4;
}
.overlap-label {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  padding-top: 0.35rem;
  display: block;
}
.overlap-1 { top: 14px; left: 14px; z-index: 1; }
.overlap-2 { top: 130px; right: 14px; z-index: 2; }
.overlap-3 { bottom: 14px; left: 32px; z-index: 3; }

/* Two-Column Grid & Frosted Cards */
.guide-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.frosted-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic);
}
.frosted-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.card-vector-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  background: #f2dce2;
  display: block;
}
.card-meta-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Cause & Effect Diagram */
.cause-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.chain-node {
  background: var(--bg-surface-solid);
  border: 1px solid var(--accent-primary);
  padding: 1.25rem;
  position: relative;
}
.chain-step-num {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0.3rem;
}

/* Tables & Checklists */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border-subtle); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface-solid);
  font-size: 0.95rem;
}
th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  background: var(--bg-plum-tint);
  color: var(--text-primary);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}
.checklist-panel {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.checklist-items { list-style: none; padding: 0; margin: 0; }
.checklist-items li {
  padding: 0.45rem 0 0.45rem 1.8rem;
  position: relative;
  border-bottom: 1px dashed var(--border-subtle);
}
.checklist-items li::before {
  content: "■";
  color: var(--accent-primary);
  position: absolute;
  left: 0.2rem;
  top: 0.45rem;
}

/* Forms */
.form-grid { display: grid; gap: 1.15rem; margin-top: 1.25rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--accent-primary);
  background: var(--bg-surface-solid);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}
.tool-output {
  background: var(--bg-plum-tint);
  border: 1px solid var(--accent-primary);
  padding: 1rem;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: all 0.7s var(--ease-kinetic); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer {
  background: #23141d;
  color: #fbf1f0;
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  border-top: 4px solid var(--accent-primary);
}
.site-footer a { color: #f5d0e2; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(251, 241, 240, 0.2);
  padding-top: 1.5rem;
  font-size: 0.9rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .lead-grid { grid-template-columns: 1fr; }
  .hero-illustration-stack { min-height: 360px; }
}
@media (max-width: 768px) {
  .mobile-dots-btn { display: inline-block; }
  .header-nav-row { display: none; }
  .header-nav-row.nav-open { display: block; }
  .main-nav { flex-direction: column; align-items: flex-start; gap: 0; padding: 0.5rem 1.5rem; }
  .main-nav a { width: 100%; border-bottom: 1px solid var(--border-subtle); }
  .guide-grid-2col, .footer-grid { grid-template-columns: 1fr; }
  .overlap-card { position: relative; width: 100%; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; margin-bottom: 0.75rem; }
  .hero-illustration-stack { min-height: auto; }
}
@media (max-width: 480px) {
  html, body { font-size: 16px; }
  .container { padding: 0 1rem; }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
