:root {
  --bg-primary: #FAF8F5;
  --bg-secondary: #F3EFE6;
  --bg-surface: #FFFFFF;
  --sage: #6E7F6E;
  --sage-dark: #526052;
  --sage-light: #EBF0EB;
  --taupe: #9D9285;
  --taupe-light: #E3DDD5;
  --charcoal: #242422;
  --text-muted: #66635F;
  --border-subtle: #E8E2D8;
  --border-focus: #6E7F6E;
  --shadow-sm: 0 2px 8px rgba(36, 36, 34, 0.04);
  --shadow-md: 0 8px 24px rgba(36, 36, 34, 0.06);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Slim Non-Sticky Header */
.site-header {
  position: relative; /* Scrolls naturally off screen */
  background-color: #FAF8F5;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  width: 100%;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.brand-icon {
  width: 22px;
  height: 22px;
  stroke: var(--sage);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.01em;
  padding: 0.35rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sage);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--sage);
  border-radius: 2px;
}

.header-cta {
  background-color: var(--sage);
  color: #FFFFFF !important;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 30px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.header-cta:hover {
  background-color: var(--sage-dark);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  color: var(--charcoal);
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-secondary);
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section {
  padding: 4rem 0;
}

.section-tight {
  padding: 2.5rem 0;
}

/* Typography Helpers */
.title-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.lead-text {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Hero Section */
.hero-portal {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-stats-panel {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  margin-bottom: 1.25rem;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-label-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--charcoal);
  font-weight: 500;
}

.stat-bar-bg {
  width: 100%;
  height: 6px;
  background-color: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background-color: var(--sage);
  border-radius: 6px;
  transition: width 0.8s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--sage);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--sage-dark);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--taupe-light);
  color: var(--charcoal);
}

.btn-outline:hover {
  border-color: var(--charcoal);
  background-color: rgba(255,255,255,0.6);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--taupe-light);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--bg-secondary);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--taupe);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.card-title {
  font-size: 1.2rem;
  font-family: var(--font-serif);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--charcoal);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-actions {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

/* Interactive Components */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.1rem;
  font-size: 0.8125rem;
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.filter-tab.active,
.filter-tab:hover {
  background-color: var(--charcoal);
  color: #FAF8F5;
  border-color: var(--charcoal);
}

/* Calculator & Interactive Boxes */
.calc-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--charcoal);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--charcoal);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--sage);
  background: #FFFFFF;
}

.calc-result-panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.calc-result-number {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  color: var(--sage-dark);
  line-height: 1;
  margin: 0.5rem 0;
}

/* Interactive Checklists */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.checklist-item:hover {
  border-color: var(--taupe);
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--sage);
  margin-top: 0.25rem;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.checklist-item.done {
  background-color: #F8FAF8;
  opacity: 0.75;
}

.checklist-item.done .checklist-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Long-form Article Reading View */
.article-header {
  padding: 1.5rem 0 2rem;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.85rem;
  color: var(--taupe);
  margin-top: 1rem;
  flex-wrap: wrap;
}

.article-hero-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 1.5rem 0 2.5rem;
  border: 1px solid var(--border-subtle);
}

.article-content {
  max-width: 760px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--charcoal);
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--charcoal);
  font-weight: 500;
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--charcoal);
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: #383633;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
  color: #383633;
}

.article-content li {
  margin-bottom: 0.6rem;
}

.callout-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--sage);
  padding: 1.5rem 1.75rem;
  margin: 2.25rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.975rem;
  line-height: 1.7;
}

.article-nav-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Universal Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--charcoal);
  color: #ECE9E4;
  padding: 4rem 0 2rem;
  border-top: 1px solid #383734;
}

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

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: #FFFFFF;
}

.footer-col p {
  color: #B5B0A6;
  font-size: 0.875rem;
  line-height: 1.6;
}

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

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

.footer-links a {
  color: #B5B0A6;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #FAF8F5;
  padding-left: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  font-size: 0.78rem;
  color: #9E998F;
  line-height: 1.6;
}

.footer-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-content {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-grid, .calc-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .header-cta {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}