/* =========================================
   LEOFF 2 Retirement Structural Simulator
   Professional Institutional Styling
========================================= */

/* ---------- ROOT COLOR SYSTEM ---------- */

:root {
    --bg-light: #ece0d1;
    --accent-light: #dbc1ac;
    --accent-mid: #967259;
    --accent-deep: #634832;
    --accent-dark: #38220f;

    --text-primary: #2b2b2b;
    --text-muted: #6b6b6b;
    --card-bg: #ffffff;
}


/* ---------- BASE LAYOUT ---------- */

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 40px auto 80px auto;
    padding: 0 20px;
}

.header {
    text-align: center;
    padding: 40px 20px 20px 20px;
}

.header h1 {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent-deep);
}

.subtext {
    font-size: 14px;
    color: var(--text-muted);
}


/* ---------- CARD SYSTEM ---------- */

.card {
    background: var(--card-bg);
    padding: 28px;
    margin-bottom: 28px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--accent-light);
}

.tab-card {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--accent-deep);
    font-weight: 600;
}

.results-card h2 {
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 12px;
}


/* ---------- TOP TABS (CONNECTED STYLE) ---------- */

.tabs-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: -1px; /* Pull into card */
    flex-wrap: wrap;
}

.tabs-wrapper .tab-btn {
    padding: 10px 18px;
    border: 1px solid var(--accent-light);
    border-bottom: none;
    background: var(--accent-light);
    color: var(--accent-deep);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.tabs-wrapper .tab-btn:hover {
    background: var(--accent-mid);
    color: white;
}

.tabs-wrapper .tab-btn.active {
    background: var(--card-bg);
    color: var(--accent-deep);
    position: relative;
    top: 1px; /* Visually connects */
}


/* ---------- TAB CONTENT ---------- */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* ---------- GRID LAYOUTS ---------- */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}


/* ---------- INPUT STYLING ---------- */

label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

input,
select {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d4d4d4;
    font-size: 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-mid);
    box-shadow: 0 0 0 2px rgba(150, 114, 89, 0.2);
}


/* ---------- BUTTON ---------- */

.run-container {
    text-align: center;
    margin: 30px 0 50px 0;
}

.primary-btn {
    background-color: var(--accent-deep);
    color: white;
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.primary-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}

.primary-btn:active {
    transform: translateY(0);
}


/* ---------- CHART AREA ---------- */

#comparisonChart {
    margin-top: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--accent-light);
}


/* ---------- LEGEND ---------- */

#legend {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}


/* ---------- TOOLTIP ---------- */

#tooltip {
    position: absolute;
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    z-index: 10;
    border-left: 4px solid var(--accent-mid);
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}
.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}
/* ============================= */
/* Disclaimer Page Styling       */
/* ============================= */

.disclaimer-page-bg {
    background:
        linear-gradient(
            180deg,
            rgba(244, 241, 234, 0.72) 0%,
            rgba(244, 241, 234, 0.60) 34%,
            rgba(244, 241, 234, 0.88) 100%
        ),
        radial-gradient(
            circle at 82% 18%,
            rgba(106, 143, 107, 0.22),
            transparent 34%
        ),
        url("/assets/illustrations/deceptionpass.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.disclaimer-page .site-header {
    overflow: visible;
    align-items: center;
}

.disclaimer-page .site-header img {
    height: 120px;
    display: block;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
}

.disclaimer-page .logo-wrap {
    position: absolute;
    left: 40px;
    top: 100%;
    transform: translateY(-52%);
    z-index: 20;
}

.disclaimer-page .nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-left: 260px;
}

.disclaimer-page .nav a,
.disclaimer-page .nav-auth-status {
    margin-left: 0;
}

.disclaimer-page .nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.disclaimer-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 44px 36px 84px;
}

.disclaimer-panel {
    max-width: 900px;
    padding: 36px 38px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(203,223,189,.26), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.52)),
        rgba(255,255,255,.36);
    border: 1px solid rgba(255,255,255,.42);
    box-shadow: 0 16px 38px rgba(30, 47, 68, .10);
    backdrop-filter: blur(7px);
}

.disclaimer-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 77, 58, .12);
    color: var(--pnw-evergreen);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.disclaimer-panel h1 {
    margin: 16px 0 14px;
    max-width: 760px;
    color: var(--pnw-navy);
    font-size: clamp(38px, 6vw, 68px);
    line-height: .98;
    letter-spacing: -.04em;
}

.disclaimer-panel h2 {
    margin: 30px 0 12px;
    color: var(--pnw-evergreen);
    font-size: 23px;
    line-height: 1.18;
}

.disclaimer-panel p {
    max-width: 760px;
    margin: 0 0 16px;
    color: rgba(42, 42, 42, .82);
    font-size: 16px;
    line-height: 1.68;
}

.disclaimer-panel > p:first-of-type {
    color: rgba(42, 42, 42, .78);
    font-size: 18px;
    line-height: 1.65;
}

.disclaimer-panel .last-updated {
    margin-top: 18px;
    margin-bottom: 26px;
    color: var(--pnw-river);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.disclaimer-panel p:last-child {
    margin-bottom: 0;
}

.disclaimer-panel ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 0;
    margin: 4px 0 18px;
    list-style: none;
}

.disclaimer-panel li {
    padding: 11px 13px;
    border-radius: 14px;
    background: rgba(31, 77, 58, .08);
    border: 1px solid rgba(31, 77, 58, .10);
    color: var(--pnw-navy);
    font-weight: 700;
}

.emphasis {
    display: inline-flex;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(63, 124, 133, .12);
    color: var(--pnw-navy);
    font-weight: 800;
}

.closing {
    margin-top: 22px;
    font-weight: 700;
}

.back-link {
    margin-top: 14px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--pnw-evergreen);
    color: white;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(31, 77, 58, .16);
    transition: transform .14s ease, box-shadow .16s ease, background .16s ease;
}

.back-link a:hover {
    background: var(--pnw-river);
    box-shadow: 0 16px 26px rgba(31, 77, 58, .20);
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .disclaimer-shell {
        padding: 28px 16px 56px;
    }

    .disclaimer-page .site-header {
        padding: 14px 12px;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 14px;
    }

    .disclaimer-page .logo-wrap {
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        justify-content: space-between;
        transform: none;
    }

    .disclaimer-page .logo-wrap img {
        height: 56px;
    }

    .disclaimer-page .logo-wrap::after {
        padding: 4px 8px;
        font-size: 9px;
    }

    .disclaimer-page .nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding-left: 0;
    }

    .disclaimer-page .nav a,
    .disclaimer-page .nav-auth-status {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        text-align: center;
        background: rgba(255,255,255,.12);
        border: 1px solid rgba(255,255,255,.16);
    }

    .disclaimer-panel {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .disclaimer-panel > p:first-of-type {
        font-size: 16px;
    }

    .disclaimer-panel ul {
        grid-template-columns: 1fr;
    }

    .back-link a {
        width: 100%;
        box-sizing: border-box;
    }
}
/* ============================= */
/* Last Updated Timestamp        */
/* ============================= */

.last-updated {
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--pnw-river);
    margin-bottom: 30px;
    font-weight: 500;
}
/* ======================================================
   Footer
====================================================== */

.footer {
    margin-top: 80px;
    padding: 25px 0;
    background-color: #dbc1ac;
    border-top: 2px solid #967259;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 14px;
    color: #38220f;
}

.footer-link {
    text-decoration: none;
    font-weight: 600;
    color: #634832;
    transition: opacity 0.2s ease;
}

.footer-link:hover {
    opacity: 0.7;
}
/* =========================================================
   COMPACT EXPENSE GRID
========================================================= */

.expense-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin-bottom: 15px;
}

.expense-grid .input-group {
    margin-bottom: 0;
}

.expense-summary {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #DDD;
}

.expense-summary input {
    background: #F7F7F7;
    font-weight: 600;
}
.expense-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin-bottom: 20px;
}

.expense-summary {
    border-top: 1px solid #DDD;
    padding-top: 15px;
}

.expense-summary input {
    background: #F7F7F7;
    font-weight: 600;
}
.inflation-footnote {
    font-size: 12px;
    color: #6F4E37; /* coffee tone */
    margin-top: 6px;
}

.inflation-footnote a {
    color: #4B3621;
    text-decoration: underline;
}

.inflation-footnote a:hover {
    opacity: 0.8;
}
/* =========================================================
   ASSET + RETIREMENT TYPE BUTTONS
   Matches institutional tab styling
========================================================= */

.asset-type-buttons,
#retirementButtonBar,
#assetButtonBar,
#debtButtonBar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.asset-type-buttons button,
#retirementButtonBar button,
#assetButtonBar button,
#debtButtonBar button,
.asset-choice-btn {

    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
        var(--accent-mid);
    color: #f9f5ee;

    border: 1px solid rgba(255,255,255,0.22);
    border-bottom-color: rgba(28, 57, 61, 0.55);
    border-radius: 10px;

    padding: 10px 18px;
    min-height: 44px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;

    box-shadow:
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 6px 14px rgba(26, 53, 57, 0.10);

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
}

.asset-type-buttons button:hover,
#retirementButtonBar button:hover,
#assetButtonBar button:hover,
#debtButtonBar button:hover,
.asset-choice-btn:hover {

    background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05)),
        var(--accent-deep);
    color: white;

    border-color: rgba(255,255,255,0.34);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.16) inset,
        0 10px 18px rgba(26,53,57,0.16);
    transform: translateY(-1px);
}

.asset-type-buttons button:active,
#retirementButtonBar button:active,
#assetButtonBar button:active,
#debtButtonBar button:active,
.asset-choice-btn:active {

    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 4px 8px rgba(26,53,57,0.12);
}
/* =========================================================
   SECONDARY BUTTONS
   Used for: Add Pension / Add Income / etc
========================================================= */

.secondary-btn {

    background: transparent;
    color: var(--accent-deep);

    border: 2px solid var(--accent-mid);
    border-radius: 8px;

    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.secondary-btn:hover {

    background: var(--accent-mid);
    color: white;

    border-color: var(--accent-mid);

}


.secondary-btn:active {

    transform: translateY(1px);

}
/* GRID LAYOUT FOR ALL ACCOUNT/ASSET MODULES */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

/* CARD STYLE */

.module-card {
  background: #f6f3ef;
  border: 1px solid #d8c9b6;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

/* FORM COMPRESSION */

.module-card .form-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.module-card label {
  grid-column: span 2;
  font-weight: 600;
}

.module-card input,
.module-card select {
  width: 100%;
  box-sizing: border-box;
}
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 16px;
    margin-top: 20px;
}

.module-card {
    background: var(--panel-light);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #d9d1c7;
}

.module-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.module-summary {
    font-size: 14px;
    margin-bottom: 10px;
}

.module-editor {
    display: none;
    margin-top: 10px;
}

.module-editor label {
    display:block;
    font-size:13px;
    margin-top:8px;
}

.module-editor input {
    width:100%;
    padding:6px;
    margin-top:3px;
}

.module-actions {
    margin-top:10px;
}

.btn-edit {
    background:var(--coffee-medium);
    color:white;
    border:none;
    padding:6px 12px;
    border-radius:4px;
    cursor:pointer;
}
.summary-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;
    margin-bottom:20px;
}

.summary-card {
    background:#f6f1ea;
    border:1px solid #d9d1c7;
    border-radius:8px;
    padding:14px;
}

.summary-label {
    font-size:12px;
    color:#555;
}

.summary-value {
    font-size:20px;
    font-weight:600;
}

/* ===============================
   SITE FOOTER
================================ */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    background: #38220F;
    border-top: 1px solid #e5e7eb;

    padding: 10px 24px;
    font-size: 13px;

    z-index: 1000;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: #ece0d1;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #ece0d1;
}

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

/* Prevent page content hiding behind footer */
body {
    padding-bottom: 55px;
}

/* Disable floating footer on small screens */
@media (max-width: 900px) {

    .footer {
        position: static;
    }

    body {
        padding-bottom: 0;
    }

}
