:root {
    --primary-bg: #F9FAFB;
    --secondary-bg: #FFFFFF;
    --accent-bg-blue: #E0F2FE;
    --accent-bg-green: #F0FDF4;
    --accent-bg-beige: #FDF6B2;
    --main-text: #1F2937;
    --secondary-text: #4B5563;
    --accent-text-blue: #0369A1;
    --button-bg: #0284C7;
    --button-text: #FFFFFF;
    --border-color: #E5E7EB;
    --main-font: 'Inter', sans-serif;
    --heading-font: 'Lexend', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--main-text);
    font-family: var(--main-font);
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.625rem;
    }

    h3 {
        font-size: 1.375rem;
    }

    body {
        font-size: 1rem;
    }

    .mobile-text-break {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

a,
a:hover,
a:focus {
    text-decoration: none;
    transition: all 0.3s ease;
}

button,
.btn {
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

button:hover,
.btn:hover {
    transform: scale(1.03);
}

input,
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-bg-blue);
    border-color: var(--accent-text-blue);
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== header_main ===== */
header {
    font-family: inherit;
}

.js-mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

a,
button {
    transition: all 0.2s ease-in-out;
}

/* ===== hero_banner ===== */
#hero {
    width: 100%;
}

/* ===== featured_post ===== */
#featured {
    width: 100%;
    background-color: var(--primary-bg);
}

.js-featured-card {
    width: 100%;
    transition: transform 0.3s ease;
}

.js-featured-btn {
    background-color: var(--button-bg);
    color: var(--button-text);
}

.js-featured-btn:hover {
    background-color: var(--accent-text-blue);
}

/* ===== literacy_intro ===== */
#intro-literacy {
    width: 100%;
}

/* ===== retirement_planning_section ===== */
#long-term-planning {
    scroll-behavior: smooth;
}

.step-icon-bg {
    transition: transform 0.3s ease;
}

.step-icon-bg:hover {
    transform: scale(1.05);
}

/* ===== budgeting_basics ===== */
#budget-principles {
    width: 100%;
}

#budget-principles table {
    width: 100%;
    border-spacing: 0;
}

#budget-principles .overflow-x-auto {
    width: 100%;
}

/* ===== track_spending_guide ===== */
#expense-tracking {
    width: 100%;
}

.js-track-item {
    transition: all 0.3s ease;
}

/* ===== tracker_apps_review ===== */
#digital-tools {
    width: 100%
}

#digital-tools .card {
    transition: transform 0.3s ease
}

#digital-tools .card:hover {
    transform: translateY(-4px)
}

/* ===== overspending_habits ===== */
.js-hack-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease
}

.js-hack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1)
}

/* ===== save_money_techniques ===== */
#saving-strategies {
    width: 100%;
}

.saving-strategy-visual-wrapper {
    width: 100%;
}

/* ===== save_for_retirement_guide ===== */
#retirement-prep {
    width: 100%;
}

#retirement-prep .js-timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

/* ===== budgeting_app_2026 ===== */
#tech-2026 {
    position: relative;
    overflow: hidden;
}

#tech-2026 img {
    transition: transform 0.5s ease;
}

#tech-2026:hover img {
    transform: scale(1.02);
}

/* ===== final_overview ===== */
#summary {
    width: 100%
}

#summary img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover
}

@media(min-width:1024px) {
    #summary img {
        aspect-ratio: 4/5
    }
}

.summary-link-item {
    color: var(--accent-text-blue);
    transition: transform 0.2s ease-in-out
}

.summary-link-item:hover {
    transform: translateX(4px)
}

/* ===== newsletter_form_block ===== */
#subscribe {
    width: 100%;
}

.js-feedback-form input::placeholder,
.js-feedback-form textarea::placeholder {
    color: var(--secondary-text);
    opacity: 0.5;
}

.js-feedback-form .checkbox:checked {
    background-color: var(--button-bg);
    border-color: var(--button-bg);
}

/* ===== footer_main ===== */
#footer {
    width: 100%;
}

.footer-expert-img {
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid var(--accent-bg-blue);
}

.footer-title {
    margin-bottom: 1.25rem;
}