:root {
    color-scheme: dark;
    --navy: #0a1424;
    --text: #e8edf5;
    --heading: #ffffff;
    --muted: #aebbcd;
    --line: rgba(255, 255, 255, 0.16);
    --blue-light: #6db4ff;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--navy);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0 16px 32px;
    color: var(--text);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-wrap: anywhere;
}

/* wallpaper-ul de la login, ca la pagina de ștergere; textul lung stă pe un card aproape opac */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
}

body::before {
    background: url("assets/background-mobile.jpg") center top / cover no-repeat;
}

body::after {
    background: linear-gradient(180deg, rgba(8, 18, 38, 0.3) 0%, rgba(8, 18, 38, 0.55) 45%, rgba(8, 18, 38, 0.85) 100%);
}

.page {
    max-width: 860px;
    margin: 0 auto;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 46vh;
    padding: 32px 0;
    text-align: center;
}

.logo {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
}

h1 {
    margin: 12px 0 0;
    color: var(--heading);
    font-size: clamp(32px, 7vw, 52px);
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.updated {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 14px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.card {
    padding: clamp(22px, 4vw, 44px);
    background: rgba(9, 19, 38, 0.93);
    border: 1px solid rgba(110, 170, 255, 0.3);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

section,
.toc {
    margin-top: 32px;
    scroll-margin-top: 16px;
}

section:first-child {
    margin-top: 0;
}

h2 {
    margin: 0 0 10px;
    color: var(--heading);
    font-size: 21px;
    line-height: 1.3;
}

h3 {
    margin: 18px 0 6px;
    color: var(--heading);
    font-size: 16px;
}

p {
    margin: 0 0 12px;
}

ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

li {
    margin-bottom: 6px;
}

a {
    color: var(--blue-light);
}

a:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
}

address {
    font-style: normal;
}

.toc {
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.toc ol {
    margin: 0;
    padding-left: 26px;
}

.toc li {
    margin-bottom: 3px;
    break-inside: avoid;
}

.toc a {
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

.table {
    margin-bottom: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th,
td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: break-word;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--heading);
}

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-top: 20px;
    font-size: 14px;
}

footer a {
    color: var(--text);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

footer a[aria-current] {
    color: var(--blue-light);
    font-weight: 700;
}

@media (max-width: 480px) {
    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 8px 6px;
    }
}

@media (min-width: 700px) {
    .toc ol {
        columns: 2;
        column-gap: 40px;
    }
}

@media (min-width: 1100px) {
    body::before {
        background-image: url("assets/background.jpg");
        background-position: center 72%;
    }

    .hero {
        min-height: 62vh;
    }
}
