/* ===========================
   BASE SETUP
=========================== */
:root {
    --blue:    #2563eb;
    --blue-lt: #eff6ff;
    --green:   #16a34a;
    --green-lt:#f0fdf4;
    --red:     #dc2626;
    --red-lt:  #fef2f2;
    --yellow:  #d97706;
    --yellow-lt:#fffbeb;
    --teal:    #0891b2;
    --teal-lt: #ecfeff;
    --purple:  #7c3aed;
    --purple-lt:#f5f3ff;
    --text:    #1e293b;
    --muted:   #64748b;
    --border:  #e2e8f0;
    --white:   #ffffff;
    --bg:      #f1f5f9;
    --card-bg: #ffffff;
    --radius:  20px;
    --radius-sm: 12px;
    --shadow:  0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.13);
}

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

html { scroll-behavior: smooth; font-size: 18px; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

/* ===========================
   TOP NAVIGATION
=========================== */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.topnav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.topnav__brand {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--blue);
    white-space: nowrap;
}

.topnav__links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topnav__links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid var(--border);
    transition: all 0.18s;
    white-space: nowrap;
}

.topnav__links a:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

/* ===========================
   PAGE SHELL
=========================== */
.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

/* ===========================
   HERO
=========================== */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #0891b2 100%);
    border-radius: 28px;
    padding: 40px 36px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.hero__badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 14px;
}

.hero__desc {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 52ch;
    margin-bottom: 24px;
}

.hero__steps-hint {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    flex-shrink: 0;
}

.step-dot.active {
    background: white;
    color: var(--blue);
}

.step-line {
    width: 28px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.step-hint-text {
    width: 100%;
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 700;
}

/* GLANCE CARD */
.glance-card {
    background: rgba(255,255,255,0.13);
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 24px 28px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.glance-title {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    opacity: 0.95;
}

.glance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.glance-row--big {
    border-bottom: none;
    padding-bottom: 4px;
}

.glance-label {
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.85;
}

.glance-val {
    font-size: 1.1rem;
    font-weight: 900;
}

.glance-val.red  { color: #fca5a5; }
.glance-val.green { color: #86efac; }

/* ===========================
   STEPS
=========================== */
.steps { display: grid; gap: 44px; }

.step-section { display: grid; gap: 20px; }

.step-label {
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 1.3rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
}

.step-desc {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
    max-width: 70ch;
    padding-left: 64px;
    margin-top: -10px;
}

/* ===========================
   CARDS
=========================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 28px 24px;
    box-shadow: var(--shadow);
    border: 1.5px solid var(--border);
    position: relative;
}

.card--wide { width: 100%; }

.card__icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.card__heading {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card__sub {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 18px;
}

/* ===========================
   LAYOUTS
=========================== */
.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.four-col {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* ===========================
   FORMS & INPUTS
=========================== */
.form-stack { display: grid; gap: 20px; margin-top: 16px; }

.form-inline {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-end: end;
    margin-top: 16px;
}

.field-wrap { display: grid; gap: 6px; }

.field-label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.field-hint {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.input-icon-wrap {
    display: flex;
    align-items: center;
    border: 2.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-icon-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.input-prefix {
    padding: 0 14px;
    font-weight: 900;
    font-size: 1rem;
    color: var(--muted);
    background: #f8fafc;
    border-right: 2px solid var(--border);
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-height: 54px;
}

.input-big {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border: none;
    outline: none;
    color: var(--text);
    background: transparent;
}

select.input-big {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border: 2.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

select.input-big:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.13); }
.btn:active { transform: translateY(0); }

.btn--lg    { padding: 16px 28px; font-size: 1.1rem; }
.btn--full  { width: 100%; }

.btn--primary { background: var(--blue); color: white; }
.btn--primary:hover { background: #1d4ed8; }

.btn--green   { background: var(--green); color: white; }
.btn--green:hover { background: #15803d; }

.btn--accent  { background: var(--teal); color: white; }
.btn--accent:hover { background: #0e7490; }

/* ===========================
   SAVED BOX
=========================== */
.saved-box {
    margin-top: 18px;
    padding: 18px 20px;
    background: var(--green-lt);
    border: 2px solid #bbf7d0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
}

.saved-box__icon { font-size: 1.3rem; }
.saved-box__label { color: var(--muted); font-weight: 700; }
.saved-box strong { font-size: 1.2rem; font-weight: 900; margin-left: auto; }

/* ===========================
   BADGE
=========================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--blue-lt);
    color: var(--blue);
}

.badge--teal { background: var(--teal-lt); color: var(--teal); }

/* ===========================
   STAT CARDS
=========================== */
.stat-card {
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
    border: 1.5px solid transparent;
}

.stat-icon  { font-size: 2rem; }
.stat-label { font-size: 0.9rem; font-weight: 800; color: var(--muted); }
.stat-value { font-size: 1.4rem; font-weight: 900; }

.stat-card--blue   { background: var(--blue-lt);   border-color: #bfdbfe; }
.stat-card--blue   .stat-value { color: var(--blue); }
.stat-card--red    { background: var(--red-lt);    border-color: #fecaca; }
.stat-card--red    .stat-value { color: var(--red); }
.stat-card--green  { background: var(--green-lt);  border-color: #bbf7d0; }
.stat-card--green  .stat-value { color: var(--green); }
.stat-card--yellow { background: var(--yellow-lt); border-color: #fde68a; }
.stat-card--yellow .stat-value { color: var(--yellow); }

/* ===========================
   SAVINGS PROGRESS
=========================== */
.savings-progress-card { padding: 24px 28px; }

.progress-heading {
    font-size: 1.05rem;
    font-weight: 900;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.progress-sub {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.progress-bar-wrap {
    display: grid;
    gap: 8px;
}

.progress-bar-bg {
    height: 20px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), #4ade80);
    transition: width 0.4s ease;
}

.progress-label {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--green);
}

/* ===========================
   EXPENSE LIST
=========================== */
.expense-list {
    display: grid;
    gap: 10px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 12px;
}

.expense-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.expense-item:hover { background: #eff6ff; }

.expense-item__emoji { font-size: 1.6rem; flex-shrink: 0; }

.expense-item__info { flex: 1; min-width: 0; }

.expense-item__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.expense-item__meta {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

.expense-item__amount {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--red);
    white-space: nowrap;
}

.delete-button {
    font-family: 'Nunito', sans-serif;
    background: var(--red-lt);
    color: var(--red);
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
}

.delete-button:hover { background: #fecaca; transform: scale(1.04); }

.empty-state {
    padding: 28px 20px;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    margin-top: 12px;
}

/* ===========================
   ALLOCATION LIST
=========================== */
.allocation-list { display: grid; gap: 14px; margin-top: 4px; }

.allocation-card {
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
}

.allocation-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.allocation-copy strong { font-size: 1rem; font-weight: 900; }
.allocation-copy span   { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.allocation-values      { text-align: right; }
.allocation-values strong { font-size: 1.05rem; font-weight: 900; display: block; }
.allocation-values span  { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

.allocation-bar {
    height: 16px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.allocation-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.allocation-fill--needs   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.allocation-fill--wants   { background: linear-gradient(90deg, #0891b2, #38bdf8); }
.allocation-fill--savings { background: linear-gradient(90deg, #16a34a, #4ade80); }

/* ===========================
   CANVAS CHART
=========================== */
canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1.5px solid var(--border);
    display: block;
    margin-top: 4px;
}

/* ===========================
   SCORE CARD
=========================== */
.score-card { text-align: center; }

.score-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 16px auto 14px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, white 72%, transparent 73% 100%),
        conic-gradient(var(--green) 0deg, #e2e8f0 0deg);
    box-shadow: 0 4px 20px rgba(22,163,74,0.18);
}

.score-ring__value {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--text);
}

.score-status {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.score-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.score-breakdown__item {
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-icon  { font-size: 1.3rem; }
.sb-label { font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.score-breakdown__item strong { font-size: 1rem; font-weight: 900; color: var(--text); }

/* ===========================
   TIPS LIST
=========================== */
.tips-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.tips-list li {
    padding: 14px 16px 14px 20px;
    background: var(--blue-lt);
    border-left: 5px solid var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.55;
}

/* ===========================
   FORECAST
=========================== */
.forecast-list { display: grid; gap: 14px; margin-top: 8px; }

.forecast-item {
    background: var(--green-lt);
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.forecast-period { font-size: 0.95rem; font-weight: 800; color: var(--muted); }
.forecast-amount { font-size: 1.15rem; font-weight: 900; color: var(--green); }
.highlight-amount { font-size: 1.3rem; color: var(--blue); }

/* ===========================
   GOAL PLANNER
=========================== */
.goal-result-box {
    margin-top: 20px;
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.98rem;
}

.goal-result-box--empty {
    border: 2px dashed var(--border);
    color: var(--muted);
    background: #f8fafc;
    text-align: center;
}

.goal-output--success {
    background: var(--green-lt);
    border: 2px solid #bbf7d0;
    color: var(--text);
}

.goal-output__meta {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.goal-output--success strong {
    display: block;
    font-size: 1.4rem;
    color: var(--green);
    margin: 4px 0 12px;
}

.goal-output--success div {
    font-size: 0.92rem;
    color: var(--muted);
    margin-top: 6px;
}

/* ===========================
   CHAT CARD HEADER
=========================== */
.chat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-clear-chat {
    font-family: 'Nunito', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid #fecaca;
    background: var(--red-lt);
    color: var(--red);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
}
.btn-clear-chat:hover { background: #fecaca; transform: scale(1.04); }

/* ===========================
   CHAT
=========================== */
.chat-examples {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--blue-lt);
    border-radius: var(--radius-sm);
}

.chat-example-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

.chat-chip {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    border: 2px solid var(--blue);
    background: white;
    color: var(--blue);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.chat-chip:hover { background: var(--blue); color: white; }

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    scroll-behavior: smooth;
}

.message-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 88%;
}

.message-wrap--bot  { align-self: flex-start; align-items: flex-start; }
.message-wrap--user { align-self: flex-end;   align-items: flex-end; }

.message {
    padding: 13px 17px;
    border-radius: 18px;
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.6;
}

.message--bot {
    background: white;
    border: 1.5px solid var(--border);
    border-bottom-left-radius: 5px;
    color: var(--text);
}

.message--user {
    background: var(--blue);
    color: white;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    padding: 0 4px;
}

.chat-divider {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--muted);
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 999px;
    align-self: center;
    margin: 4px 0;
    border: 1px solid var(--border);
}

/* Typing indicator */
.typing-bubble {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 14px 18px;
}
.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.45;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

.chat-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.chat-input {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 18px;
    border: 2.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.chat-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

/* ===========================
   TOAST
=========================== */
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    min-width: 220px;
    max-width: 340px;
    padding: 16px 20px;
    border-radius: 16px;
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    background: #1e293b;
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
    transform: translateY(140%);
    transition: transform 0.25s ease;
    z-index: 1000;
}

.toast.is-visible    { transform: translateY(0); }
.toast--success      { background: var(--green); }
.toast--warning      { background: var(--red); }
.toast--info         { background: var(--blue); }

/* ===========================
   FOOTER
=========================== */
/* ===========================
   PROFESSIONAL FOOTER
=========================== */
.footer {
    background: #1e293b;
    color: rgba(255,255,255,0.75);
    margin-top: 60px;
}

.footer__top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 52px 32px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer__brand { display: flex; flex-direction: column; gap: 10px; }

.footer__logo {
    font-size: 2.2rem;
    line-height: 1;
}

.footer__name {
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.footer__tagline {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    max-width: 28ch;
}

.footer__privacy-note {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4ade80;
    margin-top: 4px;
}

.footer__col-title {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 14px;
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__links a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 0.16s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer__links a:hover { color: #ffffff; }

/* divider line */
.footer__top + .footer__bottom {
    border-top: 1.5px solid rgba(255,255,255,0.1);
}

.footer__bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    border-top: 1.5px solid rgba(255,255,255,0.1);
}

.footer__copy {
    font-size: 0.88rem;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
}

.footer__trademark {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.42);
    max-width: 60ch;
}

.footer__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.footer__badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.8);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 13px;
    border-radius: 999px;
}

/* ===========================
   RESPONSIVE — TABLET
=========================== */
@media (max-width: 1024px) {
    .four-col   { grid-template-columns: repeat(2, 1fr); }
    .three-col  { grid-template-columns: repeat(2, 1fr); }
    .form-inline { grid-template-columns: 1fr 1fr; }
    .form-inline .btn { grid-column: 1 / -1; }
    .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ===========================
   RESPONSIVE — MOBILE
=========================== */
@media (max-width: 768px) {
    html { font-size: 16px; }

    .topnav__links a { font-size: 0.78rem; padding: 5px 10px; }

    .hero {
        grid-template-columns: 1fr;
        padding: 28px 22px;
    }

    .hero__title { font-size: 1.8rem; }

    .two-col,
    .three-col,
    .four-col,
    .form-inline { grid-template-columns: 1fr; }

    .score-breakdown { grid-template-columns: repeat(3, 1fr); }

    .step-desc { padding-left: 0; }

    .step-title { font-size: 1.2rem; }

    .card { padding: 20px 18px; }

    .chat-examples { flex-direction: column; align-items: flex-start; }
    .footer__top { grid-template-columns: 1fr; gap: 24px; padding: 36px 22px 28px; }
    .footer__bottom { padding: 18px 22px 24px; }
}

@media (max-width: 480px) {
    .topnav__inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .topnav__links { gap: 6px; }

    .score-breakdown { grid-template-columns: repeat(3, 1fr); }
    .score-breakdown__item { padding: 8px 4px; }
    .sb-label { font-size: 0.7rem; }

    .forecast-item { flex-direction: column; align-items: flex-start; gap: 4px; }

    .expense-item { flex-wrap: wrap; }
}
