body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #ece9e6, #ffffff);
    color: #333;
}

h1 {
    text-align: center;
    font-size: 2.8em;
    margin: 30px 0;
    color: #1d3557;
    text-transform: uppercase;
}

h4 {
    font-size: 1.5em;
    color: #457b9d;
    margin-bottom: 10px;
    text-transform: uppercase;
}

p {
    font-size: 1em;
    line-height: 1.8;
    margin: 10px 0 20px;
    color: #555;
}

.rate-title {
    font-size: 0.44em; /* Reduced by 25% */
    padding: 5px; /* Added padding */
}

.rate-table {
    padding: 8px;
}

/* Center table section titles (e.g. PURCHASE FIXED-RATE MORTGAGES) */
.rate-table h3,
.rate-table-1 h3,
.rate-table-2 h3,
.rate-table-3 h3,
.rate-table-4 h3,
[class*="rate-table"] h3 {
    text-align: center !important;
}

.treasury-rate-box {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 20px auto 28px;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 1.1em;
    text-align: center;
    color: #333;
}

.treasury-rate-box strong {
    color: #1d3557;
}

.footer-above {
    margin-top: 30px;
    text-align: center;
    padding: 12px 0;
}

.footer-above a {
    color: #1d3557;
    text-decoration: none;
    font-size: 0.95em;
}

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

.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed; /* Ensures equal column width */
}

th, td {
    padding: 15px 20px;
    text-align: left;
    font-size: 1em;
    border: 1px solid #dee2e6;
    word-wrap: break-word; /* Ensures content wraps in columns */
}

th {
    background-color: #1d3557;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75em; /* Reduced by 25% */
}

tr:nth-child(even) {
    background-color: #f1f3f5;
}

tr:hover {
    background-color: #e9ecef;
}

.rate-footer {
    margin-top: 0;
    text-align: center;
    padding: 20px 0;
    background: #1d3557;
    color: #ffffff;
    font-size: 0.9em;
}

.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #457b9d;
    color: #ffffff;
    text-align: center;
    padding: 15px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.consent-banner button {
    margin-left: 10px;
    padding: 10px 15px;
    border: none;
    background: #1d3557;
    color: #ffffff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s;
}

.consent-banner button:hover {
    background-color: #a8dadc;
    color: #1d3557;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    h1 {
        font-size: 2em;
        margin: 20px;
    }

    .treasury-rate-box {
        font-size: 1em;
        padding: 12px 16px;
        max-width: 100%;
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }

    .treasury-rate-box .treasury-issued {
        display: block;
        margin-top: 0.35em;
    }

    h4 {
        font-size: 1.2em;
    }

    p {
        font-size: 0.9em;
        line-height: 1.6;
    }

    th, td {
        padding: 8px;
        font-size: 1.0em;
    }

    .rate-footer {
        font-size: 0.8em;
        padding: 15px 0;
    }

    .consent-banner {
        padding: 10px;
        font-size: 0.9em;
    }

    .consent-banner button {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .table-responsive {
        padding: 5px;
    }

    table {
        font-size: 0.8em;
    }
}
