:root {
  /* Core palette */
  --forest-deep: #2f5d50;
  --moss: #6b8f71;
  --sage: #a7c4a0;
  --bark: #8b6f4e;
  --clay: #c4a484;

  /* Neutrals */
  --soil-dark: #2b2b2b;
  --parchment: #f4f1ec;
  --stone: #d8d5cf;

  /* Accents */
  --leaf-accent: #4a7c59;
  --sky-muted: #e6efe9;
  
  --primary-blue: #2563eb;
  --bg-gray: #f8fafc;
  --text-dark: #1e293b;
}

* {
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateX(20px); /* Slides in from the right */
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

h1, h2, h3 {
  color: var(--forest-deep);
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.4rem;
  margin-top: 0;
}


body {
  background-color: var(--parchment);
  color: var(--soil-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  line-height: 1.6;
}

/*body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: #222;
}*/

header {
  padding: 2rem;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
}

.pledge-container {
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 1rem;
}

#pledge {
  background-color: var(--sky-muted);
  border-left: 6px solid var(--forest-deep);
  padding: 1.75rem 2rem;
  border-radius: 6px;
}

#pledge ul {
  margin-left: 1.25rem;
}

#pledge li {
  margin-bottom: 0.6rem;
}

canvas {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.debt-calc-section {
    display: grid;
    /* On mobile: 1 column. On desktop: auto-fit. */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.calc-card {
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* This covers the whole screen when the menu is open */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Transparent black */
    display: none; /* Hidden by default */
    z-index: 9;    /* Just below the side menu (z-index 10) */
}

.menu-overlay.active {
    display: block;
}

.input-group {
    position: relative;
    margin: 15px 0;
	position: relative; /* This allows the span to be positioned 'relative' to this box */
    display: flex;
    align-items: center;
    width: 100%;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: bold;
	pointer-events: none; /* This allows clicks to 'pass through' the $ into the input */
    z-index: 1;
}

input[type="number"] {
    width: 100%;
    padding: 12px 12px 12px 30px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 18px;
    transition: border-color 0.2s;
	display: block;
    margin: 10px 0;
}

input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

input {
    max-width: 100%;
    box-sizing: border-box; /* The 'gold standard' for fixing spill-over */
}

.result-display {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-blue);
}

.comparison-box {
    grid-column: 1 / -1; /* This spans from the first to the last column */
    background: #e0f2fe;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
}

.share-container {
    grid-column: 1 / -1;
    text-align: center;
}

.share-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.05);
    background: #1d4ed8;
}

#transactResult {
    color: #10b981; /* Green for transaction/flow money */
}


.date-controls {
  max-width: 800px;
  margin: 1.5rem auto 0.75rem auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bark);
}

.date-controls label {
  font-weight: 500;
}

.date-controls input[type="date"] {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--stone);
  border-radius: 4px;
  background-color: #fff;
}


/*
.pledge-container {
  max-width: 800px;   /* keeps text from stretching full width */
/*  margin: 2rem auto;  /* centers horizontally and adds vertical space */
/*  padding: 1rem;
}

#pledge {
  background-color: #f9f9f9;
  border-left: 5px solid #4a90e2;
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
}*/

/*.date-controls {
  max-width: 800px;
  margin: 1.5rem auto 0.5rem auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.95rem;
}*/


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.flow-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.adventurecard {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 { color: #333; margin-bottom: 1.5rem; }

.btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover { background-color: #0056b3; }

.secondary-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 20px;
    line-height: 1.5;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: #1f3d2b; /* deep forest green */
  padding: 60px 20px;
  transition: left 0.3s ease;
  z-index: 1000;
}

.side-menu a {
  display: block;
  color: #e6f2ea;
  text-decoration: none;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.side-menu.open {
  left: 0;
}


footer {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin: 3rem 0 2rem;
}