﻿/* Mission and Vision Boxes */
.mission-box {
    background: #fbf1dd;
    border-left: 6px solid #e0a82e;
    padding: 1.2em 1.5em;
    margin: 2em 0 1.5em 0;
    border-radius: 7px;
    font-size: 1.08em;
    box-shadow: 0 2px 8px rgba(224,168,46,0.10);
}
.vision-box {
    background: #e6f9e6;
    border-left: 4px solid #4caf50;
    padding: 1em;
    margin: 1em 0;
    font-size: 1em;
    color: #1b3a1b;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(76,175,80,0.07);
}

/* Financial Guide Styling */

* {
    box-sizing: border-box;
}

body {
    font-family: Charter, Georgia, 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background: #f5f5f5;
}

/* Site Header */
.site-header {
    background: linear-gradient(135deg, #271f1a 0%, #1f1b16 100%);
    color: #fff;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-branding {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.site-branding h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5em;
}

.site-branding h1 a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.site-branding h1 a:hover {
    color: #e0a82e;
}

.tagline {
    color: #e0a82e;
    font-size: 1.2em;
    margin: 0;
    font-style: italic;
}

/* Navigation */
.site-nav {
    max-width: 900px;
    margin: 1.5rem auto 0;
    padding: 0 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

.site-nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
    display: inline-block;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.site-nav a.active {
    background: #e0a82e;
    color: #271f1a;
    font-weight: bold;
}

/* Main Content */
.content {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Site Footer */
.site-footer {
    background: #271f1a;
    color: #ccc;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.site-footer p {
    margin: 0.5rem 0;
}

.site-footer em {
    color: #e0a82e;
}

/* Chapter Navigation */
.chapter-nav {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    background: #f9f9f9;
}

.chapter-nav a {
    margin: 0 10px;
    font-weight: bold;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }

p {
    margin: 0 0 1em 0;
    text-indent: 0;
}

/* Table of Contents */
#TOC {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 2em 0;
    background: #f9f9f9;
}

#TOC a {
    text-decoration: none;
    color: #a06a12;
}

#TOC a:hover {
    text-decoration: underline;
}

/* Links */
a {
    color: #a06a12;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin: 1em 0;
    padding-left: 2em;
}

/* Tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95em;
}

.content th,
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.92em;
}
.content th,
.content td {
    border: 1px solid #e6e6e6;
    padding: 6px 8px;
    vertical-align: top;
    text-align: left;
}
}

.content tbody tr:nth-child(odd) {
    background: #fafafa;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.table-responsive table {
    min-width: 700px; /* reduce min-width to avoid horizontal scroll where possible */
}

/* Compact tables for small reference lists (centered, not full-width) */
.table-compact {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.table-compact table {
    /* Use fixed layout so colgroup widths are respected */
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

/* Tighter, wrapped layout for compact reference tables */
.table-compact th,
.table-compact td {
    padding: 4px 6px;
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
    font-size: 0.95em;
}
/* Keep compact table alignment natural (left) for readability */

/* Make first column shrink to content and avoid wrapping so it doesn't become too wide */
/* (reverted) Previous first-column nowrap caused layout regressions; default behavior restored */

/* Portfolio-specific tweaks */
.table-portfolio table {
    font-size: 0.9em;
}
.table-portfolio th,
.table-portfolio td {
    padding: 6px 8px;
}
/* Right-align numeric columns (third column onward) for portfolio tables */
.table-portfolio th:nth-child(n+3),
.table-portfolio td:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Code and pre */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
}

pre {
    background: #f4f4f4;
    padding: 10px;
    overflow-x: auto;
    border-radius: 5px;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #ddd;
    margin: 1em 0;
    padding-left: 1em;
    color: #666;
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2em 0;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #fbf6ec 0%, #f2e8d6 100%);
    border-left: 5px solid #e0a82e;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    text-align: center;
}

.cta-section h3 {
    color: #271f1a;
    margin-top: 0;
}

.cta-section a {
    display: inline-block;
    background: #271f1a;
    color: #fff;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.cta-section a:hover {
    background: #e0a82e;
    color: #271f1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-branding h1 {
        font-size: 1.8em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    .content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .site-nav a {
        display: block;
        margin: 0.5rem 0;
    }
    
    .cta-section a {
        display: block;
        margin: 0.5rem 0;
    }
}

/* Sidebar / Callout */
.sidebar {
    background: #fffaf0;
    border-left: 5px solid #e0a82e;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Principle Box */
.principle-box {
    background: #fbf3dd; /* soft amber */
    border-left: 4px solid #e0a82e;
    padding: 12px 16px;
    margin: 1rem 0 1.5rem;
}
.principle-box p {
    margin: 0;
    font-weight: bold;
}

/* You Are Here mini-map */
.mini-map {
    background: #f9f9fb;
    border: 1px dashed #ddd;
    padding: 10px 14px;
    margin: 1rem 0 1.5rem;
    font-size: 0.95em;
}
.mini-map strong { font-weight: 700; }

.sidebar h3 {
    margin-top: 0;
    color: #271f1a;
}

.sidebar p:last-child {
    margin-bottom: 0;
}

/* Principle Callout */
.principle {
    background: #fbf6ec;
    border-left: 5px solid #c68a2e;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.principle h2 {
    margin-top: 0;
    color: #271f1a;
}

.principle p:last-child {
    margin-bottom: 0;
}
    border: 0;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

/* Print styles */
@media print {
    body {
        max-width: 100%;
        font-size: 11pt;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    #TOC {
        page-break-after: always;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Shading for empty table rows */
.empty-row {
    background-color: #f2f2f2;
}

/* ============================================================
   Interactive Tools (calculators, template, grader)
   ============================================================ */
.tool {
    background: #fdf8ef;
    border: 1px solid #eaddc4;
    border-left: 5px solid #c68a2e;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    box-shadow: 0 2px 10px rgba(198,138,46,0.06);
}
.tool h3 {
    margin-top: 0;
    color: #271f1a;
}
.tool .tool-hint {
    font-size: 0.9em;
    color: #567;
    margin-top: 0;
}

/* Generic field rows */
.field-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}
.field-row label {
    min-width: 220px;
    text-align: left;
}
.field-row input[type="number"],
.field-row select {
    padding: 6px 10px;
    font-size: 1em;
    border: 1px solid #bcd;
    border-radius: 5px;
    width: 160px;
}
.tool button {
    padding: 8px 20px;
    font-size: 1em;
    border-radius: 6px;
    border: none;
    background: #c68a2e;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.tool button:hover { background: #a5701c; }

/* Result box shown after a calculation */
.result-box {
    background: #fff;
    border: 1px solid #eaddc4;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}
.result-box .big-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #0a7d3c;
}
.result-box .muted { color: #567; font-size: 0.9em; }

/* Budget template inputs */
.budget-table input[type="number"] {
    width: 110px;
    padding: 4px 6px;
    border: 1px solid #cdd;
    border-radius: 4px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.budget-table input[type="text"] {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #cdd;
    border-radius: 4px;
}
.budget-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.budget-total-row td {
    font-weight: 700;
    background: #f7f0e2;
    border-top: 2px solid #c68a2e;
}
.budget-controls {
    margin: 0.75rem 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.budget-controls button.secondary {
    background: #eef2f6;
    color: #234;
    border: 1px solid #cdd;
}
.budget-controls button.secondary:hover { background: #e0e8ef; }

/* Grade badge for the budget grader */
.grade-badge {
    display: inline-block;
    font-size: 2.4em;
    font-weight: 800;
    line-height: 1;
    padding: 0.2em 0.5em;
    border-radius: 10px;
    color: #fff;
    min-width: 1.6em;
    text-align: center;
}
.grade-A { background: #1b8a3a; }
.grade-B { background: #4caf50; }
.grade-C { background: #d6a400; }
.grade-D { background: #e07b00; }
.grade-F { background: #c62828; }
.grader-notes { margin-top: 0.75rem; }
.grader-notes li { margin: 0.25rem 0; }

@media (max-width: 600px) {
    .field-row label { min-width: 0; width: 100%; }
    .field-row input[type="number"],
    .field-row select { width: 100%; }
}

/* ============================================================
   Tools grid + support buttons (home page)
   ============================================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.tool-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #c68a2e;
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}
.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(198,138,46,0.15);
    text-decoration: none;
}
.tool-card h3 {
    margin: 0 0 0.4rem 0;
    color: #271f1a;
    font-size: 1.1em;
}
.tool-card p {
    margin: 0;
    font-size: 0.92em;
    color: #555;
}

.support-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.support-btn {
    display: inline-block;
    background: #271f1a;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.support-btn:hover {
    background: #c68a2e;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

/* "Go deeper" callout linking to the full external tools */
.go-deeper {
    display: block;
    margin: 1rem 0 1.5rem;
    padding: 0.9rem 1.1rem;
    background: #fbf6ec;
    border-left: 4px solid #c68a2e;
    border-radius: 6px;
    color: #3d2f1c;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s, transform 0.15s;
}
.go-deeper:hover {
    background: #f2e8d6;
    transform: translateX(2px);
    text-decoration: none;
    color: #3d2f1c;
}
.go-deeper strong {
    color: #9a6a15;
}

/* Home page hero banner */
.hero {
    position: relative;
    margin: -2rem -2rem 2.5rem;
    min-height: 440px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background-image: url('PeopleAtSunset.jpg');
    background-size: cover;
    background-position: center 32%;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}
.hero-overlay {
    width: 100%;
    padding: 2.75rem 2.5rem 2.25rem;
    background: linear-gradient(to top,
        rgba(31,27,22,0.94) 0%,
        rgba(31,27,22,0.72) 40%,
        rgba(31,27,22,0.15) 80%,
        rgba(31,27,22,0) 100%);
    color: #fff;
}
.hero-eyebrow {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: #f0c04a;
    margin: 0 0 0.6rem;
}
.hero-title {
    font-size: 2.7rem;
    line-height: 1.12;
    margin: 0 0 0.7rem;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.hero-subtitle {
    font-size: 1.18rem;
    line-height: 1.5;
    max-width: 640px;
    margin: 0 0 1.5rem;
    color: #ececf3;
}
.hero-cta {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e0a82e;
    color: #271f1a;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.hero-cta:hover {
    background: #f0c04a;
    color: #271f1a;
    transform: translateY(-2px);
    text-decoration: none;
}
@media (max-width: 768px) {
    .hero {
        min-height: 360px;
        margin: -1.5rem -1.5rem 2rem;
        background-position: center 28%;
    }
    .hero-overlay {
        padding: 2rem 1.5rem 1.75rem;
    }
    .hero-title {
        font-size: 1.95rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
}
