@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/manrope-latin-600.woff2") format("woff2");
}
@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/manrope-latin-700.woff2") format("woff2");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/inter-latin-500.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin-400.woff2") format("woff2");
}

html[lang^="en"] [lang|="pt"]:not(.gh-content, .gh-content *),
html[lang^="en"] [lang|="es"]:not(.gh-content, .gh-content *),
html[lang^="es"] [lang|="pt"]:not(.gh-content, .gh-content *),
html[lang^="es"] [lang|="en"]:not(.gh-content, .gh-content *),
html:not([lang^="en"]):not([lang^="es"]) [lang|="en"]:not(.gh-content, .gh-content *),
html:not([lang^="en"]):not([lang^="es"]) [lang|="es"]:not(.gh-content, .gh-content *) { display: none !important; }

:root {
    --midnight: #101D32;
    --accent: #1769AA;
    --teal: #18A6A6;
    --cloud: #F1F4F7;
    --white: #FFFFFF;
    --ink: #101D32;
    --muted: #5A6A7A;
    --line: #D5DDE5;
    --link: #1769AA;
    --font-display: Manrope, "Segoe UI", sans-serif;
    --font-text: Inter, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --header-h: 76px;
    color-scheme: light;
}

html[data-theme="dark"] {
    --cloud: #0B1424;
    --white: #15233A;
    --ink: #F1F4F7;
    --muted: #A8B6C4;
    --line: #2A3C54;
    --link: #8EC4EE;
    color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cloud);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.65;
}

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

a { color: var(--link); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.45rem, 2vw, 1.8rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

::selection { background: #18A6A6; color: #101D32; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: #fff;
    color: var(--midnight);
    padding: 0.5rem 0.8rem;
    z-index: 40;
}
.skip-link:focus { top: 1rem; }

.wrap {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--midnight);
    color: #fff;
}

.header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    min-height: var(--header-h);
    padding: 0.55rem 0.65rem 0.55rem 0.2rem;
}

.header-inner:has(.header-start) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.header-start,
.header-end {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}
.header-end { justify-content: flex-end; }
.header-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #fff;
    text-decoration: none;
    flex: none;
    min-width: 0;
}
.brand-mark { width: 36px; height: 36px; flex: none; }

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 1.05rem;
    white-space: nowrap;
}
.brand-name span {
    background: linear-gradient(90deg, #3C8DDE, #18A6A6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand-tag {
    display: none;
    color: #9FB0C3;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.brand-text { display: flex; flex-direction: column; }

.nav-toggle,
.theme-toggle,
.copy-code,
.share button,
.consent button {
    font: inherit;
    cursor: pointer;
    border-radius: 8px;
}

.nav-toggle,
.theme-toggle {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.nav-toggle .nav-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }
.theme-toggle { position: relative; }
.theme-icon { display: none; width: 1.15rem; height: 1.15rem; }
html:not([data-theme="dark"]) .theme-icon-dark,
html[data-theme="dark"] .theme-icon-light { display: block; }
.theme-toggle [data-theme-label] { display: none; }
html:not([data-theme="dark"]) .theme-toggle [data-theme-label="light"],
html[data-theme="dark"] .theme-toggle [data-theme-label="dark"] {
    display: inline;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.lang-switch {
    display: inline-flex;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    overflow: hidden;
}
.lang-switch button {
    background: transparent;
    color: #c5d0dc;
    border: 0;
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
}
html[lang^="en"] .lang-switch [data-lang-set="en"],
html[lang^="es"] .lang-switch [data-lang-set="es"],
html:not([lang^="en"]):not([lang^="es"]) .lang-switch [data-lang-set="pt"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.menu {
    display: none;
    gap: 0.75rem;
}
.menu.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    gap: 1.15rem;
    margin: 0;
    padding: 0.9rem max(1rem, calc((100% - 1120px) / 2)) 1.15rem;
    background: var(--midnight);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}
.menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.menu-search,
.menu-signout { display: none; }
.menu-signout { margin: 0; }
.menu-signout button {
    color: #fff;
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}
.account-links { display: flex; gap: 0.75rem; align-items: center; flex: none; min-width: 0; }
.menu + .lang-switch { margin-left: auto; }
.account-links form { margin: 0; }
.account-links a, .account-links button { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.92rem; background: transparent; border: 0; padding: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.account-links a { display: inline-block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.account-links a:hover, .account-links button:hover { color: #8FD4D4; }
.auth-providers { display: grid; gap: 0.7rem; max-width: 24rem; margin: 1rem 0 1.4rem; }
.auth-provider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 3rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}
.auth-provider:hover { border-color: var(--teal); }
.auth-provider svg { width: 1.25rem; height: 1.25rem; display: block; flex: none; }
.auth-email { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 32rem; }
.auth-email input { flex: 1 1 16rem; }
.auth-email .button { width: fit-content; }
.auth-email .turnstile-slot,
.auth-email .form-status { flex: 1 1 100%; }
.auth-error p { margin: 0; }

.header-search { flex: 0 1 11rem; width: 11rem; min-width: 0; max-width: 11rem; }
.header-search input,
input,
textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}
.header-search input {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    min-width: 0;
    padding: 0.45rem 0.65rem;
}
.header-search input::placeholder { color: #b7c3d0; }

.accent-line {
    height: 3px;
    background: linear-gradient(90deg, #1769AA, #18A6A6);
}

.hero {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    padding: 2.5rem 0 1rem;
}
.hero-copy p:last-of-type { color: var(--muted); max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.2rem; }
.hero-visual {
    position: relative;
    min-height: 220px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--midnight);
}
.hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    object-position: 82% center;
    display: block;
}
.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--cloud) 0%, transparent 34%);
    pointer-events: none;
}

.section { padding: 1.5rem 0; }
.section-head, .page-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}
.page-head { padding-top: 2rem; }
.page-head p { color: var(--muted); max-width: 42rem; }

.kicker {
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}
.kicker.brand-word { text-transform: none; }
.sitemap-table { width: 100%; border-collapse: collapse; }
.sitemap-table th,
.sitemap-table td {
    text-align: left;
    padding: 0.7rem 0.35rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.sitemap-table th {
    color: var(--teal);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sitemap-table a { text-decoration: none; overflow-wrap: anywhere; }
.sitemap-table tbody tr:hover td { background: rgba(24, 166, 166, 0.08); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
}
.button-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.card-grid {
    display: grid;
    gap: 1rem;
}
.post-card, .featured, .newsletter, .about-band, .category-card, .notice {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-card h2 { font-size: 1.2rem; margin: 0.35rem 0; }
.post-card h2 a, .featured h3 a { color: inherit; text-decoration: none; }
.post-card-body, .featured-body { padding: 1rem 1rem 1.1rem; }
.post-card-media, .featured-media { display: block; background: var(--midnight); }
.post-card-media img, .featured-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card-fallback {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(23, 105, 170, 0.35), rgba(24, 166, 166, 0.15)),
        var(--midnight);
}
.post-card-fallback img { width: 72px; height: 72px; aspect-ratio: auto; }
.meta { color: var(--muted); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }

.featured { display: grid; overflow: hidden; }
.featured h3 { font-size: clamp(1.5rem, 2vw, 2rem); margin: 0.4rem 0 0.6rem; }

.category-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}
.category-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.category-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: transparent;
    padding: 11%;
}
.category-card .category-name {
    color: var(--ink);
    font-weight: 700;
    padding: 0.9rem 1rem 1rem;
    min-height: 2.7em;
}
.category-card p { color: var(--muted); padding: 0.35rem 1rem 1rem; margin: 0; }
.tag-icon {
    width: 160px;
    height: 160px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    background: transparent;
    padding: 18px;
    display: block;
}

.about-band, .newsletter { padding: 1.4rem; }
.newsletter-form, .search-form, .hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.newsletter-form input, .search-form input { flex: 1 1 220px; }
.newsletter-form .turnstile-slot,
.newsletter-form .form-status { flex: 1 1 100%; }

.prose, .article-header, .gh-content { max-width: 46rem; }
.prose { padding: 2rem 0 3rem; }
.deck { font-size: 1.2rem; color: var(--muted); }
.gh-content { font-size: 1.075rem; line-height: 1.75; }
.gh-content > * { margin-top: 0; }
.gh-content h2, .gh-content h3 { margin-top: 2rem; scroll-margin-top: 96px; }
.gh-content img, .gh-content video { border-radius: 10px; }
.gh-content ul, .gh-content ol { padding-left: 1.2rem; }
.gh-content blockquote {
    margin: 1.4rem 0;
    padding: 0.2rem 0 0.2rem 1rem;
    border-left: 3px solid var(--teal);
    color: var(--muted);
}
.gh-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border-bottom: 1px solid var(--line); padding: 0.55rem 0.4rem; text-align: left; }
.gh-content pre,
.kg-code-card pre {
    position: relative;
    background: var(--midnight);
    color: #E8EEF4;
    border-radius: 10px;
    padding: 2.3rem 1rem 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.55;
}
.kg-code-card { position: relative; margin: 1.4rem 0; }
.code-lang {
    position: absolute;
    top: 0.55rem;
    left: 0.8rem;
    color: #8AA0B4;
    font-family: var(--font-text);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.copy-code {
    position: absolute;
    top: 0.4rem;
    right: 0.45rem;
    background: transparent;
    color: #E8EEF4;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.5rem;
}
.hljs-keyword, .hljs-selector-tag { color: #7FDBFF; }
.hljs-string, .hljs-attr { color: #9BE7C4; }
.hljs-number, .hljs-literal { color: #F5D48A; }
.hljs-comment { color: #8AA0B4; }
.hljs-title, .hljs-function, .hljs-name, .hljs-built_in { color: #8EC8FF; }

.kg-callout-card { border-left: 3px solid var(--teal); background: var(--white); padding: 0.8rem 1rem; border-radius: 8px; }
.kg-bookmark-card { border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem; }
.kg-card figcaption { color: var(--muted); font-size: 0.9rem; }
.kg-width-wide {
    width: min(72rem, calc(100vw - 2rem));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.kg-width-full {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
}
.kg-width-wide img,
.kg-width-full img { width: 100%; }

.article {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.article > .article-header,
.article > .article-layout,
.article-main .gh-content {
    width: min(calc(46rem * 1.56), calc(100% - 2rem));
    max-width: calc(46rem * 1.56);
}
.article-header {
    margin-inline: auto;
    padding-top: 2rem;
    text-align: center;
}
.article-header .crumbs,
.article-header .meta { justify-content: center; }
.article-header .deck { margin-inline: auto; }
.article-header .cover { margin: 1.25rem auto 1.4rem; max-width: 40rem; }
.article-header .cover img { width: 100%; border-radius: 12px; display: block; margin-inline: auto; }
.article-header h1 { margin-top: 0; }
.article-main .gh-content { text-align: left; margin-inline: auto; }
.article-main .gh-content pre,
.article-main .gh-content .kg-code-card,
.article-main .gh-content table { text-align: left; }
.article-main .share { justify-content: center; }
.article-layout { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding-bottom: 3rem; }
.article-main, .article-aside { width: 100%; }
.crumbs { color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.crumbs a { color: inherit; }
.cover figcaption { color: var(--muted); font-size: 0.9rem; }
.share { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; justify-content: center; margin: 1.5rem 0 0; }
.share-label { width: 100%; margin: 0 0 0.15rem; font-weight: 700; text-align: center; }
.share a, .share button {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
}
.share [hidden] { display: none !important; }
.share svg { width: 2.5rem; height: 2.5rem; display: block; }
.share a:hover, .share button:hover { transform: translateY(-2px); }
.share-status { width: 100%; min-height: 1.3rem; margin: 0.2rem 0 0; text-align: center; color: var(--muted); }
.community { width: 100%; margin-top: 2.2rem; }
.community-bar { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: center; }
.like-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font: inherit;
    cursor: pointer;
}
.like-button svg { display: block; }
.like-button svg path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.like-button[aria-pressed="true"] { color: #1769AA; border-color: #1769AA; }
.like-button[aria-pressed="true"] svg path { fill: currentColor; }
.community-note { margin: 0; color: var(--muted); }
.comment-list { display: grid; gap: 0.75rem; margin: 1rem 0; }
.comment { border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; background: var(--white); }
.comment header { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; color: var(--muted); font-size: 0.9rem; }
.comment strong { color: var(--ink); }
.comment p { margin: 0.4rem 0 0; white-space: pre-wrap; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; margin-top: 0.55rem; }
.comment-actions button {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--teal);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}
.comment-edit { display: grid; gap: 0.45rem; margin-top: 0.55rem; }
.comment-edit textarea { min-height: 5.5rem; resize: vertical; }
.comment-edit .button, .comment-edit .button-secondary { width: fit-content; }
.comment-form { display: grid; gap: 0.6rem; margin-top: 1rem; }
.comment-form textarea { min-height: 7rem; resize: vertical; }
.comment-form .button { width: fit-content; }
.community-signin { margin-top: 0.6rem; }
.related { margin-top: 2rem; }
.toc { font-size: 0.92rem; }
.toc p { font-weight: 700; margin-bottom: 0.4rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc-sub { margin-left: 0.75rem; }

.pagination { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.empty-state { padding: 4rem 0; display: grid; gap: 0.8rem; justify-items: start; }
.error-page {
    min-height: 46vh;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: 0.85rem;
    padding: 4.5rem 0 5rem;
}
.error-page h1 { margin: 0; }
.error-page p { max-width: 38rem; margin: 0; }
.error-page .error-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.empty { color: var(--muted); }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.contact-form, .search-results { display: grid; gap: 0.45rem; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; }
.check input { width: auto; margin-top: 0.3rem; }
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.turnstile-slot { min-height: 65px; }
.form-status { min-height: 1.4rem; color: var(--muted); }
.notice { padding: 0.9rem 1rem; border-left: 3px solid var(--teal); }
.search-results a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.search-results strong { display: block; }

.site-footer {
    background: var(--midnight);
    color: #D5DDE6;
    margin-top: 3rem;
    padding: 0.55rem 0.65rem 0.55rem 0.2rem;
}
.footer-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem 1rem;
    width: 100%;
}
.footer-note,
.footer-copy,
.footer-base {
    margin: 0;
    color: #9FB0C3;
    font-size: 0.88rem;
}
.footer-note { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.footer-copy { margin-left: auto; white-space: nowrap; }
.site-footer a { color: #fff; text-decoration: none; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.3rem 0.75rem;
    width: 100%;
    margin-top: 0.35rem;
}
.footer-links a { white-space: nowrap; }
@media (max-width: 720px) {
    .footer-bar { flex-wrap: wrap; }
    .footer-note { flex-basis: 100%; }
}

.cookie-agreement { display: none; }
html[data-cookie="open"] .cookie-agreement { display: block; }
.consent {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 1rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 0;
    transform: translateX(-50%);
    overflow: hidden;
    background:
        linear-gradient(115deg, rgba(60, 141, 222, 0.72), rgba(24, 166, 166, 0.55) 58%, rgba(23, 105, 170, 0.4)),
        var(--midnight);
    color: #fff;
    border: 1px solid rgba(143, 212, 212, 0.72);
    border-radius: 12px;
    padding: 0 1.25rem 1rem;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.28),
        0 0 32px rgba(24, 166, 166, 0.38);
}
.consent::before {
    content: "";
    display: block;
    height: 3px;
    margin: 0 -1.25rem 0.95rem;
    background: linear-gradient(90deg, #3C8DDE, #18A6A6);
}
.consent p { margin: 0 0 0.75rem; }
.consent code { color: #E8EEF4; }
.consent a { color: #B8FFF8; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.consent button {
    background: linear-gradient(90deg, #1769AA, #0E7088);
    color: #fff;
    border: 0;
    padding: 0.5rem 0.7rem;
}
#consent-reject { background: transparent; border: 1px solid rgba(184, 255, 248, 0.55); }

@media (min-width: 800px) {
    .brand-tag { display: block; }
    .hero { grid-template-columns: 1.1fr 0.9fr; padding-top: 3rem; }
    .featured { grid-template-columns: 1.15fr 0.85fr; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .brand-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .header-search { flex-basis: 8rem; width: 8rem; max-width: 8rem; }
    .account-links a { max-width: 6.5rem; }
}

@media (max-width: 640px) {
    .account-links form { display: none; }
    .menu.is-open .menu-signout { display: block; }
}

@media (max-width: 520px) {
    .header-search { display: none; }
    .menu.is-open .menu-search { display: inline; }
    .account-links a { max-width: 5.5rem; }
    .lang-switch button { padding: 0.35rem 0.32rem; }
}

@media (max-width: 360px) {
    .account-links a { max-width: 3.25rem; }
    .header-inner { gap: 0.35rem; }
}

@media (min-width: 1024px) {
    .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .article-layout { display: flex; flex-direction: column; align-items: center; }
    .toc { position: sticky; top: 96px; }
}

@media (min-width: 1400px) {
    .nav-toggle { display: none; }
    .header-inner { column-gap: 0.4rem; }
    .menu,
    .menu.is-open {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        gap: 1rem;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    .menu-search,
    .menu.is-open .menu-search,
    .menu-signout,
    .menu.is-open .menu-signout { display: none; }
    .header-search { min-width: 5.5rem; }
    .account-links a { max-width: 7.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media print {
    .site-header, .site-footer, .share, .toc, .consent, .ad-slot, .hero-actions { display: none !important; }
    body { background: #fff; color: #000; }
}
