:root {
    --max-width: 1100px;
    --border-radius: 12px;
    --font-mono:
        ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
        "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
        "Fira Mono", "Droid Sans Mono", "Courier New", monospace;

    --foreground-rgb: 0, 0, 0;
    --background-start-rgb: 214, 219, 220;
    --background-end-rgb: 255, 255, 255;

    --primary-glow: conic-gradient(
        from 180deg at 50% 50%,
        #16abff33 0deg,
        #0885ff33 55deg,
        #54d6ff33 120deg,
        #0071ff33 160deg,
        transparent 360deg
    );
    --secondary-glow: radial-gradient(
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );

    --tile-start-rgb: 239, 245, 249;
    --tile-end-rgb: 228, 232, 233;
    --tile-border: conic-gradient(
        #00000080,
        #00000040,
        #00000030,
        #00000020,
        #00000010,
        #00000010,
        #00000080
    );

    --border: 1px solid #cbcbd9;
    --box-shadow: 0 1px 2px 0 rgba(246, 246, 246, 0.05);
    --callout-rgb: 238, 240, 241;
    --callout-border-rgb: 172, 175, 176;
    --card-rgb: 180, 185, 188;
    --card-border-rgb: 131, 134, 135;

    --border-bottom: 1px solid rgba(89, 89, 94, 0.721);
    --li-bottom: 2px solid rgba(218, 100, 10, 0.838);

    --color-btn: white;
    --color-btn-border: 1px solid rgba(116, 247, 252, 0.849);
    --color-btn-background: #262626f9;
    --color-btn-hover: rgba(249, 161, 252, 0.825);
    --color-btn-box-shadow:
        0 0.15rem 0.3rem rgba(0, 0, 0, 0.15), inset 0 0.1rem 0.2rem #fff;
    --color-link: blue;
    --thead-background: #f1f1f1ec;
    --hover: #cfcce5e7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground-rgb: 255, 255, 255;
        --background-start-rgb: 0, 0, 0;
        --background-end-rgb: 0, 0, 0;
        --primary-glow: radial-gradient(
            rgba(1, 65, 255, 0.4),
            rgba(1, 65, 255, 0)
        );
        --secondary-glow: linear-gradient(
            to bottom right,
            rgba(1, 65, 255, 0),
            rgba(1, 65, 255, 0),
            rgba(1, 65, 255, 0.3)
        );

        --tile-start-rgb: 2, 13, 46;
        --tile-end-rgb: 2, 5, 19;
        --tile-border: conic-gradient(
            #ffffff80,
            #ffffff40,
            #ffffff30,
            #ffffff20,
            #ffffff10,
            #ffffff10,
            #ffffff80
        );

        --border: 1px solid #27272a;
        --box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        --callout-rgb: 20, 20, 20;
        --callout-border-rgb: 108, 108, 108;
        --card-rgb: 100, 100, 100;
        --card-border-rgb: 200, 200, 200;

        --border-bottom: 1px solid rgba(217, 217, 233, 0.124);
        --li-bottom: 2px solid rgba(218, 100, 10, 0.838);

        --color-btn-border: 1px solid rgba(173, 249, 251, 0.675);
        --color-btn: black;
        --color-btn-background: #f4f4f4f1;
        --color-btn-hover: rgba(204, 200, 205, 0.499);
        --color-btn-box-shadow:
            0 0.15rem 0.3rem rgba(88, 88, 88, 0.085),
            inset 0 0.1rem 0.2rem rgba(17, 17, 17, 0.169);
        --color-link: rgba(163, 163, 247, 0.967);
        --thead-background: #383543cf;
        --hover: #2a2933;
    }
}

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

body {
    color: rgb(var(--foreground-rgb));
}

/* --------------------------------------- */
/* --------------------------------------- */

nav ul {
    list-style-type: none;
}

.active-page {
    position: relative;
    padding-bottom: 2px;
    border-bottom: var(--li-bottom);
}

#nav-menu {
    border-bottom: var(--border-bottom);
    margin: 1em;
}

.wrapper {
    border-bottom: var(--border-bottom);
    margin: 0 auto;
    padding: 1rem;
    align-items: center;
    max-width: 30em;
}

.container,
.navbar-container {
    padding: 1rem;
}

.container,
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
    column-gap: 2rem;
}

.menu {
    position: relative;
}

.menu-bar li:first-child .dropdown {
    flex-direction: initial;
    min-width: 480px;
}

.menu-bar li:first-child ul:nth-child(1) {
    border-right: var(--border);
}

.menu-bar li:nth-child(n + 2) ul:nth-child(1) {
    border-bottom: var(--border);
}

.menu-bar .dropdown-link-title {
    font-weight: 600;
}

.menu-bar .nav-link {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.6px;
    padding: 0.3rem;
    min-width: 60px;
    margin: 0 0.6rem;
}

.menu-bar .nav-link:hover,
.dropdown-link:hover {
    color: var(--primary-color);
}

.nav-start,
.nav-end,
.menu-bar,
.right-container,
.right-container .search {
    display: flex;
    align-items: center;
}

.dropdown {
    display: flex;
    flex-direction: column;
    min-width: 230px;
    border-radius: 10px;
    position: absolute;
    top: 236px;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    transform: scale(0.97) translateX(-5px);
    transition: 0.1s ease-in-out;
    box-shadow: var(--shadow);
}

.dropdown.active {
    visibility: visible;
    opacity: 1;
    transform: scale(1) translateX(5px);
}

.dropdown ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.2rem;
    font-size: 0.95rem;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.15rem;
}

.dropdown-link {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-radius: 7px;
    transition: 0.1s ease-in-out;
}

.dropdown-link p {
    font-size: 0.8rem;
    color: var(--medium-grey);
}

.right-container {
    display: flex;
    align-items: center;
    column-gap: 1rem;
}

.right-container .search {
    position: relative;
}

.right-container img {
    border-radius: 50%;
}

#hamburger {
    display: none;
    padding: 0.1rem;
    margin-left: 1rem;
    font-size: 1.9rem;
}

/* --------------------------------------- */
/* --------------------------------------- */
button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: inherit;
}

.btn {
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px;
    border: none;
    color: var(--color-btn);
    background-color: var(--color-btn-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--color-btn-hover);
}

#set-issue-date {
    background-color: rgba(139, 106, 106, 0.752);
    padding: 5px 10px;
    border-radius: 2px;
    margin: 0.3em 0;
}

form {
    display: flex;
    flex-direction: column;
}

form h3 {
    margin-bottom: 1em;
    text-align: center;
}

.label-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.label-input-wrapper label,
.label-input-wrapper input,
.label-input-wrapper select,
.btn-container,
.result-container {
    width: 100%;
}

.btn-container {
    text-align: center;
}

.btn-container button {
    width: 40%;
}

input {
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
    font-size: 16px;
}

#investment,
input,
select,
input[type="date"] {
    padding: 0.8em;
    margin: 0 0 1em 0.2em;
    border: var(--border);
    border-radius: 4px;
    box-sizing: border-box;
}

.input-span-wrapper {
    width: 90%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.result-wrapper {
    width: 90%;
}

.input-span-wrapper input {
    width: 95%;
}

.input-span-wrapper span {
    display: inline;
}

a {
    color: inherit;
    /* text-decoration: none; */
}

/* ------------------------- */
/* PERCENTAGE FORM */

#calculator-form {
    margin: 1em;
    padding: 0.2em;
    border-radius: 5px;
}

#calculator-form span {
    padding: 0 0.5em;
}

.module-wrapper {
    background-color: rgb(var(--background-end-rgb));
    box-shadow: var(--box-shadow);
    padding: 2em;
    margin: 1em auto;
    border-radius: 5px;
    width: 100%;
    border: var(--border);
}

.row {
    display: flex;
    flex-direction: column;
    align-items: space-between;
    margin-bottom: 10px;
}

.label {
    font-size: 0.7em;
    font-weight: 500;
    padding: 0.5em;
}

input[type="text"] {
    flex-grow: 1;
    padding: 0.5em 0.9em;
    font-size: 1em;
    border: 1px solid #cccccce2;
    border-radius: 4px;
}

#result {
    border: 1px solid rgba(163, 103, 103, 0.888);
    margin: 1rem;
    padding: 1rem;
    text-align: left;
}

#auction-results {
    border-bottom: var(--border-bottom);
    margin: 0 auto;
    padding: 1rem;
    max-width: 50em;
}

#converter-result {
    border: 1px solid rgba(163, 103, 103, 0.888);
    margin: 1em;
}

/* ---------------------------------------------------------------------- */

table {
    margin: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(163, 103, 148, 0.888);
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.2em;
    border-bottom: 1px solid rgba(48, 48, 137, 0.582);
    border-right: 1px solid rgba(48, 48, 137, 0.582);
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--thead-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

tbody tr:hover {
    background-color: var(--hover);
}

/* ---------------------------------------------------------------------- */

.grid div {
    border-bottom: 1px solid rgba(48, 48, 137, 0.582);
    border-right: 1px solid rgba(48, 48, 137, 0.582);
}

.notes-list {
    list-style-type: none;
}

.result-row {
    display: flex;
    align-items: center;
    margin-top: 1em;
}

.result-container {
    flex-grow: 1;
    padding: 0.5em 0.9em;
    font-size: 1.5em;
    border: 1px solid #cccccc;
    border-radius: 4px;
    text-align: left;
}

.formula {
    font-size: 0.8em;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

.high-rate-cont a {
    color: var(--color-link);
    text-decoration: underline;
}

/* ------`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

@media (prefers-color-scheme: dark) {
    html {
        color-scheme: dark;
    }
}

@media (max-width: 600px) {
    .right-container {
        display: none;
    }
    table {
        font-size: small;
    }
}

@media (max-width: 1100px) {
    #hamburger {
        display: block;
    }

    .menu {
        display: none;
        position: absolute;
        top: 4rem;
        left: 0;
        min-height: 100vh;
        width: 100vw;
        backdrop-filter: blur(25px) hue-rotate(180deg);
        -webkit-backdrop-filter: blur(25px) hue-rotate(180deg);
    }

    .menu-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        row-gap: 1rem;
        padding: 2rem;
    }

    .menu-bar .nav-link {
        display: flex;
        justify-content: space-between;
        width: 100%;
        font-weight: 600;
        font-size: 1.2rem;
        margin: 0;
    }

    .menu-bar li:first-child .dropdown {
        min-width: 100%;
    }

    .menu-bar li {
        border-bottom: var(--li-bottom);
    }

    .menu-bar > li:not(:last-child) {
        padding-bottom: 0.5rem;
        /* border-bottom: var(--li-bottom); */
    }

    .menu-bar li:first-child ul:nth-child(1) {
        border-right: none;
        /* border-bottom: var(--li-bottom) */
    }

    .dropdown {
        display: none;
        min-width: 100%;
        border: none !important;
        border-radius: 5px;
        position: static;
        top: 0;
        left: 0;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
    }

    .menu.show,
    .dropdown.active {
        display: block;
    }

    .dropdown ul {
        padding-left: 0.3rem;
    }
}

/* ------------------------------------------ */
/* Treasury Bills Display Styles */

.accent-value {
    color: #0d47a1;
    font-weight: bold;
}

.footer {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 10px;
    background-color: #f5f5f5;
}

/* Media query for responsiveness */
@media (max-width: 768px) {
    .treasury-table {
        min-width: 800px;
    }
}

.plot-parameters {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.plot-parameters button {
    max-width: 10rem;
}

.plot-parameters label,
.plot-parameters input {
    margin: 0.5em 0;
}
