/* Combined CSS File */
/* ================== */
/* CSS Variables */
:root {
  --primary: #8B5A2B;
  --primary-light: #A97C50;
  --secondary: #6D4C41;
  --dark: #4E342E;
  --light: #F9F5EB;
  --accent: #7B1FA2;
  --card-bg: rgba(255, 253, 245, 0.92);
  --border: #D7CCC8;
  --shadow: rgba(108, 76, 65, 0.3);
  --trm-mobile-tool-width: min(100%, 680px);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

html #calculator,
html #results,
html #sip,
html #articles,
html #subscribe {
  scroll-margin-top: 120px !important;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%234E342E"/><path d="M0 0L100 100" stroke="%236D4C41" stroke-width="1"/><path d="M100 0L0 100" stroke="%236D4C41" stroke-width="1"/></svg>');
  min-height: 100vh;
  padding: 10px;
  position: relative;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  overflow-y: scroll;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(123, 31, 162, 0.1) 0%, transparent 40%), radial-gradient(circle at 80% 80%, rgba(139, 90, 43, 0.1) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Comprehensive emoji font stack */
.emoji, [class*="emoji"], .insight::before, h2::before {
  font-family: 
      "Segoe UI Emoji", 
      "Segoe UI Symbol",
      "Apple Color Emoji", 
      "Noto Color Emoji",
      "Android Emoji", 
      "EmojiOne Mozilla",
      "Twemoji Mozilla",
      "Noto Color Emoji",
      "EmojiOne Color",
      sans-serif;
  font-weight: normal;
  font-style: normal;
  -webkit-font-feature-settings: "emoji";
  font-feature-settings: "emoji";
}

/* Specific styling for sections with emojis */
.section h2::before {
  margin-right: 8px;
}

.insight::before {
  margin-right: 8px;
}

/* Layout and Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Temple Border and Decorative Elements */
.temple-border {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.temple-border::before,
.temple-border::after {
  content: none;
  display: none;
}

.temple-border::before {
  left: auto;
}

.temple-border::after {
  right: auto;
}

/* Lantern Styles */
.lantern {
  position: fixed;
  width: 30px;
  height: 45px;
  background: #FFD700;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  animation: flicker 3s infinite alternate;
  z-index: -1;
}

.lantern::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 4px;
  background: var(--primary);
  top: -4px;
  left: 5px;
  border-radius: 5px 5px 0 0;
}

.lantern-left {
  top: 20%;
  left: 15px;
}

.lantern-right {
  top: 60%;
  right: 15px;
}

@keyframes flicker {
  0%, 100% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.7;
  }
}

/* Incense Animation */
.incense {
  position: fixed;
  width: 3px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  opacity: 0.6;
  filter: blur(2px);
  animation: smoke 15s infinite linear;
  z-index: -1;
}

@keyframes smoke {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) rotate(10deg);
    opacity: 0;
  }
}

/* Dots Loader Animation */
.dots-loader {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: flex-end;
  height: 12px;
}

.dots-loader span {
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.dots-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.dots-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.5;
  }
  to {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Header and Navigation */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.monk-figure {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  display: block;
  background-image: url("icons/monk.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px var(--dark);
  letter-spacing: 1px;
}

.tagline {
  font-size: 1rem;
  color: var(--light);
  margin-bottom: 15px;
  font-style: italic;
  text-shadow: 1px 1px 2px var(--dark);
}

/* Fixed Navigation */
.fixed-nav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(78, 52, 46, 0.95);
  padding: 10px 0;
  margin: 0 0 20px;
  backdrop-filter: blur(5px);
  border-bottom: 2px solid var(--primary);
  width: 100%;
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 0 20px;
  margin: 0 auto;
  max-width: 1200px;
}

.nav-menu a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background: rgba(139, 90, 43, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu a:hover {
  background: rgba(139, 90, 43, 0.5);
  transform: translateY(-2px);
}

/* Intro Section */
.intro-section {
  background: linear-gradient(135deg, rgba(139, 90, 43, 0.9) 0%, rgba(123, 31, 162, 0.8) 100%);
  border-radius: 12px;
  padding: 25px 20px;
  margin-bottom: 25px;
  color: var(--light);
  text-align: center;
  box-shadow: 0 8px 20px -5px var(--shadow);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.intro-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" stroke="%23F9F5EB" stroke-width="0.5" fill="none" /></svg>');
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.intro-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--light);
  position: relative;
  z-index: 1;
}

.intro-text {
  font-size: 1rem;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Wisdom Grid */
.wisdom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 25px;
}

.wisdom-card {
  background: rgba(249, 245, 235, 0.15);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(249, 245, 235, 0.2);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.wisdom-card:hover {
  transform: translateY(-3px);
}

.wisdom-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.wisdom-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.wisdom-desc {
  font-size: 0.85rem;
  color: rgba(49, 38, 9, 0.9);
}

/* Main Grid Layout */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.grid > * {
  min-width: 0;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 8px 20px -5px var(--shadow);
  padding: 20px;
  transition: transform 0.3s ease;
  border: 2px solid var(--border);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.5;
}

.card:hover {
  transform: translateY(-3px);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  text-align: center;
}

/* Form Elements */
.input-group {
  margin-bottom: 15px;
  position: relative;
}

.input-group label {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--secondary);
  padding-left: 8px;
  border-left: 2px solid var(--primary);
  font-size: 0.95rem;
}

.info-icon {
  margin-left: 8px;
  cursor: pointer;
  position: relative;
  display: inline-block;
  color: var(--primary-light);
  font-size: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--primary-light);
  text-align: center;
  line-height: 16px;
}

.info-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(-5px);
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  background-color: var(--dark);
  color: var(--light);
  text-align: left;
  border-radius: 6px;
  padding: 10px 14px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  min-width: 180px;
  width: auto;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark) transparent transparent transparent;
}

.input-with-currency {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.currency-symbol {
  background: var(--light);
  padding: 12px 8px 12px 12px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-weight: 500;
  min-height: 44px;
  color: var(--dark);
}

.input-group input:not([type="checkbox"]):not([type="range"]) {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 0 10px 10px 0;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: var(--light);
  color: var(--dark);
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}

input[type="number"] {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-group input:not([type="checkbox"]):not([type="range"]):focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.2);
}

.input-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: var(--primary);
  background: var(--light);
  flex-shrink: 0;
}

/* Slider Styles */
.slider-container {
  margin-top: 10px;
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid var(--light);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid var(--light);
}

/* Results and Output */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 15px;
}

.metric-card {
  background: var(--light);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.metric-title {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.output-section {
  margin-top: 30px;
}

.output-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.output-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 20px -5px var(--shadow);
  border: 2px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.output-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px -5px var(--shadow);
}

.output-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  line-height: 1.35;
  min-height: 6.2em;
  text-wrap: balance;
}

.output-value {
  font-size: 1.3rem !important;
  font-weight: 700;
  color: var(--accent);
  margin: 15px 0;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.years-to-freedom {
  font-size: 1.3rem !important;
  font-weight: 700;
  color: var(--accent);
  margin: 15px 0;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
  box-sizing: border-box;
}

.output-desc {
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.5;
}

.swr-hint {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f4f0, #f4eee7);
  color: var(--secondary);
  font-size: 0.92rem;
}

.swr-hint-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.swr-hint-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 90, 43, 0.14);
  border: 1px solid rgba(139, 90, 43, 0.28);
  font-size: 0.8rem;
  letter-spacing: 0.2px;
}

.swr-hint-steps {
  display: grid;
  gap: 4px;
  line-height: 1.45;
  margin: 0;
  padding-left: 1.2rem;
}

.swr-hint-steps li,
.swr-hint-steps span {
  display: block;
}

.swr-hint-steps li + li {
  margin-top: 2px;
}

.swr-hint-foot {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #6d4c41;
}

.scenario-summary {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #faf6f1 0%, #f8f4ef 100%);
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.scenario-summary .scenario-summary-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.scenario-summary .scenario-row {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e4d6c8;
  border-radius: 10px;
  background: #fffdf9;
}

.scenario-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scenario-name {
  font-weight: 700;
  color: var(--primary);
}

.scenario-status {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.scenario-status.ok {
  color: #1b5e20;
  background: #e8f5e9;
  border-color: #c8e6c9;
}

.scenario-status.warn {
  color: #b71c1c;
  background: #ffebee;
  border-color: #ffcdd2;
}

.scenario-meta {
  margin-top: 4px;
  color: #6a4c43;
  font-size: 0.9rem;
}

/* Chart Container */
.chart-container {
  margin-top: 25px;
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 250px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Status Indicators */
.status-indicator {
    text-align: center;
    background: rgba(139, 90, 43, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #5a3921;
    margin: 0 auto 20px;
    max-width: 300px;
    display: block; /* Add this */
    width: fit-content; /* Add this */
}

.status-good {
  background-color: #4CAF50;
}

.status-warning {
  background-color: #FFC107;
}

.status-bad {
  background-color: #F44336;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--light);
  color: var(--primary);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 10px var(--shadow);
  min-height: 44px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px var(--shadow);
  background: var(--light);
  color: var(--accent);
}

.download-btn {
  display: block;
  margin: 40px auto 20px auto;
  width: fit-content;
  background: #8b5a2b;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.share-btn {
  background: linear-gradient(135deg, #4b1355 0%, var(--accent) 50%, #421161 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 120px;
  margin: 0 auto 20px;
  box-shadow: 
    0 4px 15px rgba(123, 31, 162, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer effect */
.share-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.share-btn:hover::before {
  left: 50%;
}

.load-more {
  background: #8B5A2B;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.load-more:hover {
  background: #5a3921;
}

/* SVG Icon Sizing */
.btn-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
}

.wisdom-svg-icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 10px auto;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 25px;
  margin-top: 35px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 14px;
  color: white;
  border: 2px solid var(--border);
}

.cta-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: white;
}

/* Content Sections */
.content-section {
  margin: 30px 0;
  background: var(--card-bg);
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 8px 20px -5px var(--shadow);
  border: 2px solid var(--border);
}

/* [BLOCK FINANCIAL-WISDOM-WIDTH] Full tile width for rounded article cards */
#articles.content-section {
  --article-tile-padding: 25px;
  margin-top: 0;
  padding-inline: var(--article-tile-padding);
}

#articles #posts-container {
  width: calc(100% + var(--article-tile-padding) + var(--article-tile-padding));
  margin-inline: calc(0px - var(--article-tile-padding));
}

#articles .post {
  width: 95%;
  max-width: none;
}
/* [END BLOCK FINANCIAL-WISDOM-WIDTH] */

/* [BLOCK FINANCIAL-WISDOM-COMMENT-GAP] Space below the comment form tile */
#articles .comments-section {
  padding-bottom: 16px;
}
/* [END BLOCK FINANCIAL-WISDOM-COMMENT-GAP] */

/* [BLOCK BLOG-STANDALONE] Same article appearance with a fully readable standalone body */
.post .article-title-link { color: inherit; text-decoration: none; }
.post .article-title-link:hover { text-decoration: underline; }
.post .article-title-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#articles .standalone-post { margin: 0 auto; }
[data-standalone-article] #articles.content-section { padding-inline: 0; }
[data-standalone-article] .article-back-link { margin-inline: 25px; }
.standalone-post .post-content-container { max-height: none; overflow: visible; padding-bottom: 25px; }
.standalone-post .post-header h1 { font-size: 1.5em; border-bottom: 2px solid var(--border); }
.article-back-link { margin: 0 0 20px; }
.article-subscribe-link { text-align: center; margin: 20px auto; }
.article-subscribe-link a { color: var(--light); }
.post-content { overflow-wrap: anywhere; }
/* [END BLOCK BLOG-STANDALONE] */

#privacy-policy.content-section {
  margin-top: 0;
}
.content-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.content-section .intro-title {
  color: var(--primary);
  font-size: 2.5rem;
  line-height: 1.2;
}

#article-archive[hidden] {
  display: none;
}

.article-archive-note {
  margin-bottom: 16px;
  color: var(--secondary);
}

.article-link-list {
  margin: 0;
  padding-left: 24px;
}

.article-link-list li + li {
  margin-top: 10px;
}

.article-link-anchor {
  color: #1f4db8;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.article-link-anchor:hover {
  color: var(--primary);
}

.article-link-anchor:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Wisdom Text and Quotes */
.wisdom-text {
  background: rgba(139, 90, 43, 0.1);
  border-left: 3px solid var(--primary);
  padding: 12px;
  margin: 15px 0;
  border-radius: 4px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--dark);
}

.monk-quote,
.monk-quote1 {
  text-align: center;
  margin: 15px 0;
  padding: 15px;
  font-style: italic;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.monk-quote {
  color: #d2d3d7;
}

.monk-quote1 {
  color: #404145;
}

/* Notices and Info Boxes */
.disclaimer {
  background: rgba(139, 90, 43, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  font-size: 0.8rem;
  color: var(--secondary);
  text-align: center;
  border: 1px solid var(--border);
}

.calculation-info {
  background: rgba(123, 31, 162, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--secondary);
  text-align: left;
  border: 1px solid var(--border);
}

.calculation-info strong {
  color: var(--accent);
}

.comparison-note {
  background: rgba(139, 90, 43, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin: 15px 0;
  font-size: 0.85rem;
  color: var(--secondary);
  text-align: center;
  border: 1px solid var(--border);
}

/* Privacy Page Styles */
#privacy {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 8px 20px -5px var(--shadow);
  border: 2px solid var(--border);
  position: relative;
  color: var(--dark);
  line-height: 1.6;
}

#privacy::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.5;
}

#privacy h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
  text-align: center;
}

#privacy h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 25px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

#privacy h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary);
  margin: 20px 0 10px;
}

#privacy p {
  margin-bottom: 15px;
  font-size: 1rem;
}

#privacy ul,
#privacy ol {
  margin: 15px 0;
  padding-left: 25px;
}

#privacy li {
  margin-bottom: 8px;
}

#privacy a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

#privacy a:hover {
  color: var(--primary);
  text-decoration: underline;
}

#privacy .last-updated {
  text-align: center;
  font-style: italic;
  color: var(--secondary);
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

#privacy .monk-quote {
  text-align: center;
  margin: 25px 0;
  padding: 15px;
  font-style: italic;
  color: var(--dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  background: rgba(139, 90, 43, 0.05);
  border-radius: 8px;
}

#privacy .back-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 10px var(--shadow);
  margin-top: 20px;
}

#privacy .back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px var(--shadow);
  background: var(--primary-light);
}

/* Ad Container */
.ad-container {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
  border: 1px solid var(--border);
}

.ad-label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 5px;
  text-transform: uppercase;
}

/* Owl Carousel Custom Styles */
.carousel-nav {
  position: relative;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 15px;
  background: rgba(139, 90, 43, 0.1);
  padding: 10px 20px;
  border-radius: 30px;
  max-width: 200px;
}

.carousel-nav button {
  padding: 12px 20px;
  background: #8B5A2B;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.carousel-nav button:hover:not(:disabled) {
  background: #5a3921;
  transform: translateY(-2px);
}

.carousel-nav button:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.owl-carousel,
.owl-stage-outer,
.owl-stage,
.owl-item {
  height: auto !important;
}

.owl-carousel {
  display: block !important;
  visibility: visible !important;
  opacity: 1;
  transition: opacity 170ms ease;
}

.owl-carousel.wrap-fade-transition {
  opacity: 0;
}

.owl-stage {
  display: flex !important;
  justify-content: center !important;
}

.owl-item {
  display: flex !important;
  justify-content: center !important;
}

.slide {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.post {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-header {
  padding: 25px 30px 15px;
  border-bottom: 1px solid #e2e8f0;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f9f7f2;
}

.post h1,
.post h2 {
  color: var(--primary);
  margin: 0;
  padding: 0;
  line-height: 1.3;
  font-family: 'Playfair Display', serif;
}

.post-meta {
  color: #8B5A2B;
  font-size: 0.9rem;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

.post-content-container {
  padding: 0 30px;
  overflow: hidden;
  position: relative;
  max-height: 60vh;
  transition: max-height 0.3s ease;
}

.post-content {
  line-height: 1.6;
  color: #4a5568;
}

.post-content-container.expanded {
  max-height: 1000px;
  overflow-y: auto;
}

.post-content-container.fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
}

.post-footer {
  padding: 15px 30px 25px;
  display: flex;
  justify-content: center;
}

.owl-dots {
  margin-top: 20px;
  text-align: center;
}

.owl-dot span {
  width: 12px !important;
  height: 12px !important;
  background: rgba(139, 90, 43, 0.3) !important;
}

.owl-dot.active span {
  background: #8B5A2B !important;
}

.latest-badge {
  background: #8B5A2B;
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-left: 10px;
      display: inline-block; /* Ensures it centers properly */

}

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 35px;
  color: var(--light);
  border-top: 2px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
  padding: 5px;
  border-radius: 3px;
}

.footer-links a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

/* Retirement Message */
#retirement-message-top {
  font-weight: bold;
  font-size: 1rem;
  color: var(--secondary-color);
  background-color: var(--primary-color);
  padding: 12px 16px;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ================== */
/* MEDIA QUERIES */
/* ================== */

/* Mobile First - Base styles are mobile */

/* Tablet and Desktop Styles */
@media (min-width: 769px) {
  body {
    padding: 20px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  #calculator > .card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .logo {
    font-size: 3.5rem;
  }

  .tagline {
    font-size: 1.3rem;
  }

  .monk-figure {
    width: 120px;
    height: 120px;
  }

  .intro-title {
    font-size: 2.5rem;
  }

  .intro-text {
    font-size: 1.2rem;
  }

  .wisdom-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .lantern {
    width: 40px;
    height: 60px;
  }

  .lantern::after {
    width: 30px;
    height: 5px;
    top: -5px;
  }

  .lantern-left {
    left: 30px;
  }

  .lantern-right {
    right: 30px;
  }

  .output-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

#investment-recommendation {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 768px) {
  .monk-figure {
    width: 100px;
    height: 100px;
  }
}

/* Desktop Large */
@media (min-width: 992px) {
  .output-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Specific Adjustments */
@media (max-width: 767px) {
  body {
    padding: 0;
    overflow-x: hidden;
  }

  .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .site-header,
  .intro-section {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
  }

  .fixed-nav-container {
    top: 0;
    padding: 8px 0;
  }

  .nav-menu {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    padding: 0 6px;
  }

  .nav-menu a {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: clamp(0.62rem, 2.6vw, 0.8rem);
    padding: 4px 6px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .tooltip {
    max-width: 90vw;
    min-width: 140px;
    font-size: 0.85rem;
    padding: 8px 12px;
    bottom: 140%;
  }

  .tooltip::after {
    left: 50%;
    margin-left: -5px;
  }

  .chart-container {
    height: 180px;
    max-width: 100vw;
  }

  .card {
    padding: 15px;
  }

  .input-group label {
    flex-wrap: wrap;
  }

  .output-grid {
    gap: 15px;
  }

  .output-card {
    padding: 15px;
  }

  .output-title {
    min-height: 0;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .output-value,
  .years-to-freedom {
    font-size: 1.4rem;
  }

  .share-btn {
    padding: 10px 16px;
    min-height: 40px;
    min-width: 100px;
    font-size: 13px;
    margin: 0 auto 15px;
  }

  .post-content-container {
    max-height: 50vh;
  }

  .post {
    width: 95%;
  }

  .post-header {
    padding: 15px 20px 10px;
  }

  .post-content-container,
  .post-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  #privacy {
    padding: 15px;
    margin: 10px;
  }

  #privacy h1 {
    font-size: 1.8rem;
  }

  #privacy h2 {
    font-size: 1.3rem;
  }

  .content-section .intro-title {
    font-size: 2rem;
    color: var(--primary);
  }

  #articles.content-section > .intro-title {
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 12px;
  }

  #articles.content-section > h2 {
    font-size: 1.55rem;
    line-height: 1.2;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .swr-hint {
    padding: 12px;
    font-size: 0.9rem;
  }

  .swr-hint-title {
    align-items: flex-start;
    gap: 6px;
  }

  .swr-hint-steps {
    display: block;
    padding-left: 1.15rem;
  }

  .swr-hint-steps li + li,
  .swr-hint-steps span + span {
    margin-top: 6px;
  }

  .scenario-summary {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #faf6f1 0%, #f8f4ef 100%);
  }

  .scenario-summary .scenario-summary-title {
    font-size: 1.05rem;
    color: var(--primary);
  }

  .scenario-summary .scenario-row {
    padding: 10px 12px;
    border: 1px solid #e4d6c8;
    border-radius: 10px;
    background: #fffdf9;
  }

  .scenario-row-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .scenario-status {
    margin-left: auto;
  }

  .scenario-meta {
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .container,
  .output-section,
  .output-grid,
  .output-card,
  .chart-container,
  .intro-section,
  .site-header {
    max-width: 100vw;
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    overflow-x: auto;
  }

  .output-value,
  .years-to-freedom,
  .metric-value {
    font-size: 1.1rem;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .intro-title {
    font-size: 1.5rem;
  }

  .content-section .intro-title {
    font-size: 1.8rem;
    color: var(--primary);
  }

  #articles.content-section > .intro-title {
    font-size: 2rem;
    line-height: 1.15;
  }

  #articles.content-section > h2 {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .swr-hint-title {
    flex-wrap: wrap;
  }

  .swr-hint-badge {
    min-width: 40px;
    padding: 2px 7px;
  }

  .scenario-row-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .scenario-status {
    margin-left: 0;
  }

  .scenario-meta {
    font-size: 0.88rem;
  }

  .logo {
    font-size: 2rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .input-group input:not([type="checkbox"]):not([type="range"]) {
    padding: 10px;
  }

  .currency-symbol {
    padding: 10px 6px 10px 10px;
  }

  .chart-container {
    height: 140px;
    max-width: 100vw;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .lantern,
  .incense {
    animation: none;
  }
}

/* Prevent overflow in output cards and grid */
.output-grid,
.output-section,
.output-card,
.metric-card,
.chart-container,
.intro-section,
.site-header .container {
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: auto;
}

/* Ensure .output-value and .years-to-freedom wrap and never overflow */
.output-value,
.years-to-freedom,
.metric-value {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  font-size: 1.4rem;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

/* Make all input fields and labels flexible */
.input-group input,
.input-group label {
  max-width: 100vw;
  box-sizing: border-box;
}

