:root {
  --bg-canvas: #f3f0fa;
  --bg-surface: #ffffff;
  --bg-surface-hover: #faf7fd;
  --bg-dark-plum: #300d2c;
  --bg-plum-band: #64245b;
  --text-primary: #334155;
  --text-muted: #5f6368;
  --text-heading: #1e1b24;
  --text-light: #fdfafc;
  --text-light-muted: #ecd8e8;
  --accent-primary: #64245b;
  --accent-secondary: #913984;
  --accent-warm: #d97706;
  --border-subtle: #e3dbeb;
  --border-strong: #64245b;
  --shadow-hard: 4px 4px 0 #1e1b24;
  --shadow-hard-hover: 1px 1px 0 #1e1b24;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --font-mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --reading-width: 72ch;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
  position: relative;
}

/* Typography elements */
h1, h2, h3, h4 {
  color: var(--text-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1.15rem;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* Layout Containers */
.site-wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.reading-container {
  max-width: var(--reading-width);
  margin: 0 auto;
}

/* Header & Brand Capsule */
.site-header {
  position: relative;
  width: 100%;
  padding: 1.25rem 0;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--border-subtle);
}

.brand-ledger-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: inline-block;
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--accent-primary);
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.desktop-nav a {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  background: #ffffff;
  color: var(--accent-primary);
}

/* Mobile 3-dot trigger & Dropdown */
.menu-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  width: 42px;
  height: 42px;
  font-size: 1.35rem;
  color: var(--accent-primary);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--border-subtle);
  line-height: 1;
}

.mobile-menu-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 2px solid var(--accent-primary);
  padding: 1.25rem 1.5rem;
  z-index: 100;
  box-shadow: 0 10px 24px rgba(48, 13, 44, 0.08);
}

.mobile-menu-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-menu-drawer a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* Hero Section (Oversized Headline on Solid Lilac Field, NO IMAGE) */
.hero-ledger {
  background: var(--bg-canvas);
  padding: 3.5rem 0 3rem;
  border-bottom: 2px solid var(--border-subtle);
}

.hero-ledger .hero-inner {
  max-width: 900px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: inline-block;
  background: #ffffff;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
}

.hero-ledger h1 {
  color: var(--text-heading);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 2rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

/* Plum Ledger Buttons */
.btn-plum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 0;
  border: 2px solid #1e1b24;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-plum:hover {
  color: #ffffff;
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-hard-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-primary);
  background: #ffffff;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f8f4fc;
}

/* Vertical Sequence & Timeline Framework */
.timeline-track {
  position: relative;
  padding: 3rem 0 4rem;
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.timeline-node {
  position: relative;
  margin-bottom: 4rem;
  padding-left: 70px;
  z-index: 2;
}

.timeline-marker {
  position: absolute;
  left: 12px;
  top: 0;
  width: 34px;
  height: 34px;
  background: var(--bg-canvas);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  z-index: 3;
}

/* Full-width Bold Plum Transition Bands */
.plum-band {
  background-color: var(--bg-dark-plum);
  color: var(--text-light);
  padding: 3.5rem 0;
  margin: 3rem 0;
  border-top: 3px solid var(--accent-primary);
  border-bottom: 3px solid var(--accent-primary);
}

.plum-band h2,
.plum-band h3 {
  color: #ffffff;
}

.plum-band p {
  color: var(--text-light-muted);
}

.plum-band .mono-tag {
  color: #f7b7ea;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

/* Cards with Square Imagery & Overlapping Badges */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.lesson-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s var(--ease-kinetic), border-color 0.2s ease;
}

.lesson-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e6dfef;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  filter: contrast(106%) saturate(92%);
}

.card-badge {
  position: absolute;
  bottom: -12px;
  right: 16px;
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid #ffffff;
  z-index: 4;
}

.card-badge.badge-alt {
  background: #334155;
}

.card-badge.badge-amber {
  background: #8e2b58;
}

.card-content {
  padding: 1.75rem 1.5rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content h3 {
  margin-top: 0.25rem;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

/* Tables for Worked Budgets */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: #faf7fd;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
}

tr:last-child td {
  border-bottom: none;
}

.table-total {
  font-family: var(--font-mono);
  font-weight: 700;
  background-color: #f7f1f9;
}

/* Expandable Details Checklist */
.ledger-checklist {
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

details.checklist-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem;
}

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

details.checklist-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

details.checklist-item summary::-webkit-details-marker {
  display: none;
}

details.checklist-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-primary);
}

details.checklist-item[open] summary::after {
  content: "−";
}

.checklist-body {
  padding-top: 0.85rem;
  font-size: 0.94rem;
  color: #475569;
}

/* Worksheet Form Component (Contact & Inquiry) */
.worksheet-box {
  background: #ffffff;
  border: 2px solid var(--border-strong);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-hard);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--text-heading);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #faf7fd;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.status-message {
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--accent-primary);
  background: #fbf2fa;
  color: var(--accent-primary);
  display: none;
}

/* Callout Note */
.ledger-callout {
  background: #ffffff;
  border-left: 4px solid var(--accent-primary);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* Scroll reveal helper */
.reveal-init {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Global Footer */
.site-footer {
  background-color: var(--bg-dark-plum);
  color: var(--text-light);
  padding: 3.5rem 0 2.5rem;
  margin-top: 5rem;
  border-top: 4px solid var(--accent-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col p {
  color: var(--text-light-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-light-muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-light-muted);
}

.footer-bottom a {
  color: #ffffff;
  font-weight: 600;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .timeline-track::before {
    left: 18px;
  }
  .timeline-node {
    padding-left: 50px;
    margin-bottom: 3rem;
  }
  .timeline-marker {
    left: 2px;
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
  .hero-ledger {
    padding: 2.5rem 0 2rem;
  }
}

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