/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    /* Canonical surfaces/lines/text/accent live in the shared foundation
       tokens. Only legacy + unmapped extras stay here. */
    --text-color: #333;
    --card-bg: #fff;
    --link-color: #007BFF;
    --header-bg: #222;
    --footer-bg: #222;
    --timestamp-color: #999;
    --font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --fourth-bg-color: #1e1e27;
    --third-hover: #2c2c38;
    --fourth-hover: #3d414d;
    --tag-bg: #0f0f11;
    --tag-active-bg: #0f0f13;
    --nav-font-size: 14px;
    --title-size: 16px;
    --subtitle-size: 14px;
    --tag-font-size: 12px;
    --container-width: 1060px;
    --topbar-gradient-bottom: rgba(0, 0, 0, 0.63);
    --topbar-gradient-mid: rgba(0, 0, 0, 0.786);

    /* Type scale (semantic steps; headings map to these below) */
    --text-2xl: 2rem;
    --text-xl: 1.5rem;
    --text-lg: 1.25rem;
    --text-md: 1.125rem;
    --text-base: 1rem;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    background-color: #19191C;
    color: #fff;
}

h1, h2, h3, h4, h5 {
    color: #ffc107 !important;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

h1 { font-size: var(--text-2xl); line-height: 1.1; }
h2 { font-size: var(--text-xl); line-height: 1.2; }
h3 { font-size: var(--text-lg); line-height: 1.3; }
h4 { font-size: var(--text-md); line-height: 1.3; }
h5 { font-size: var(--text-base); line-height: 1.4; }

h1 a, h2 a, h3 a, h4 a, h5 a {
    color: #ffc107 !important;
    text-decoration: none !important;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover {
    color: #fff;
    text-decoration: none !important;
}

:link {
    color: var(--bs-yellow);
}

:link:hover {
    text-decoration: none !important;
}

:visited {
    color: var(--bs-yellow);
}

.width-max-content {
    width: max-content;
}

footer {
    background-color: #131314;
}

.justify-content-center {
    justify-content: center;
}

.text-primary {
    color: var(--bs-yellow) !important;
}

body > .container,
body > section .container,
body > div .container {
    max-width: 992px;
}

/* Global dark-theme form surface. font-size stays at 16px so iOS Safari
   does not zoom on focus (better-typography: inputs at 16px on mobile). */
.form-control {
    background-color: #121315;
    border: 2px solid #303338;
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:hover {
    border: 2px solid #ffc107;
}

.form-control::placeholder {
    color: #6c757d;
}

.form-control:focus {
    background-color: #121315;
    color: #fff;
    border: 2px solid #ffc107;
    box-shadow: none !important;
}

.form-select {
    background-color: #121315;
    border: 2px solid #303338;
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:hover {
    border: 2px solid #ffc107;
}

.form-select:focus {
    background-color: #121315;
    color: #fff;
    border: 2px solid #ffc107;
    box-shadow: none !important;
}