/* styles.css — naboru.com.ua — Dark Editorial: Slate + Amber */

:root {
    color-scheme: dark;

    /* Palette: dark slate + muted amber, sage as secondary */
    --bg: #111419;
    --surface: #171b21;
    --raised: #1d222a;
    --raised-2: #232932;
    --border: #2a303a;
    --border-strong: #3a414d;

    --text: #dde1e7;
    --text-strong: #eef0f3;
    --muted: #a3abb8;
    --subtle: #8b94a2;

    --accent: #e0a75e;
    --accent-hover: #ecbc7c;
    --accent-soft: rgba(224, 167, 94, 0.12);
    --accent-line: rgba(224, 167, 94, 0.45);
    --accent-contrast: #1a1409;

    --accent2: #93c2a8;
    --accent2-soft: rgba(147, 194, 168, 0.12);

    --visited: #c8a57a;
    --mark-bg: rgba(224, 167, 94, 0.22);
    --selection: rgba(224, 167, 94, 0.32);

    /* Typography */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-head: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --fs-base: 16.5px;
    --lh-base: 1.72;
    --fs-small: 0.875rem;
    --fs-xs: 0.78rem;

    --fs-h1: 1.35rem;
    --fs-h2: 1.2rem;
    --fs-h3: 1.08rem;
    --fs-h4: 1rem;

    /* Spacing scale */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;

    --gutter: var(--s-4);

    /* Shape */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --bw: 1px;
    --line: var(--bw) solid var(--border);

    /* Layout */
    --container: 1160px;
    --measure: 70ch;

    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
    --dur: 180ms;
}

@media (min-width: 480px) {
    :root {
        --gutter: 20px;
        --fs-h1: 1.45rem;
    }
}

@media (min-width: 768px) {
    :root {
        --fs-base: 17px;
        --gutter: var(--s-6);
        --fs-h1: 1.65rem;
        --fs-h2: 1.32rem;
        --fs-h3: 1.14rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --fs-base: 17.5px;
        --fs-h1: 1.85rem;
        --fs-h2: 1.42rem;
        --fs-h3: 1.18rem;
        --fs-h4: 1.05rem;
    }
}

@media (min-width: 1280px) {
    :root {
        --gutter: var(--s-7);
    }
}

/* ========== Reset ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--fs-base);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scrollbar-color: var(--border-strong) var(--bg);
    scrollbar-width: thin;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text);
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 1rem;
    line-height: var(--lh-base);
    overflow-x: hidden;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

::selection {
    background: var(--selection);
    color: var(--text-strong);
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: #4a5260;
}
::-webkit-scrollbar-corner {
    background: var(--bg);
}

/* ========== Media ========== */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img,
video {
    border-radius: var(--radius-sm);
    filter: brightness(0.92);
}

iframe {
    max-width: 100%;
    border: 0;
    border-radius: var(--radius);
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text-strong);
    font-weight: 650;
    letter-spacing: -0.012em;
    line-height: 1.3;
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 { font-size: var(--fs-h1); line-height: 1.3; font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5, h6 { font-size: 0.95rem; }

p {
    margin: 0;
}

strong, b {
    font-weight: 650;
    color: var(--text-strong);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--fs-small);
    color: var(--muted);
}

mark {
    background: var(--mark-bg);
    color: var(--text-strong);
    padding: 0 0.2em;
    border-radius: 3px;
}

abbr[title] {
    text-decoration: underline dotted var(--subtle);
    cursor: help;
}

ul, ol {
    list-style: none;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
        border-color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Code */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.88em;
}

code {
    background: var(--raised-2);
    color: #e9cfa8;
    border: var(--line);
    padding: 0.12em 0.4em;
    border-radius: var(--radius-sm);
    overflow-wrap: anywhere;
    word-break: break-word;
}

pre {
    background: #0c0e12;
    color: var(--text);
    border: var(--line);
    border-radius: var(--radius);
    padding: var(--s-4) var(--s-5);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.6;
    tab-size: 4;
    max-width: 100%;
}

pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: 0.9em;
    overflow-wrap: normal;
    word-break: normal;
    white-space: pre;
}

kbd {
    display: inline-block;
    background: var(--raised);
    color: var(--text-strong);
    border: var(--line);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 0.05em 0.45em;
    font-size: 0.82em;
    line-height: 1.5;
}

hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: var(--s-7) 0;
}

/* Forms */
input,
textarea,
select,
button {
    font: inherit;
    color: var(--text);
}

input,
textarea,
select {
    background: var(--surface);
    border: var(--line);
    border-radius: var(--radius-sm);
    padding: var(--s-3) var(--s-4);
    min-height: 44px;
    width: 100%;
    max-width: 100%;
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: var(--subtle);
    opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--raised);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-line);
    outline-offset: 1px;
}

button,
input[type="submit"],
input[type="button"],
.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 44px;
    width: auto;
    padding: var(--s-2) var(--s-5);
    background: var(--raised);
    color: var(--text-strong);
    border: var(--bw) solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-weight: 550;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.btn:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
}

button:active,
.button:active,
.btn:active {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tables (global) */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

/* ========== Header ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 20, 25, 0.94);
    border-bottom: var(--line);
}

@supports (backdrop-filter: blur(8px)) {
    .site-header {
        background: rgba(17, 20, 25, 0.82);
        backdrop-filter: saturate(120%) blur(8px);
        -webkit-backdrop-filter: saturate(120%) blur(8px);
    }
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-2) var(--gutter);
    min-height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 44px;
    font-family: var(--font-head);
    font-weight: 750;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text-strong);
    min-width: 0;
}

.logo img,
.logo svg {
    width: auto;
    max-height: 32px;
    filter: none;
    border-radius: 0;
}

.logo:hover {
    color: var(--accent-hover);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    font-size: var(--fs-small);
    font-weight: 550;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-wrap: wrap;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 var(--s-3);
    color: var(--muted);
    border: var(--bw) solid transparent;
    border-radius: var(--radius-sm);
}

.lang-switcher a:hover {
    color: var(--text-strong);
    background: var(--surface);
    border-color: var(--border);
}

.lang-switcher a.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-line);
}

@media (min-width: 768px) {
    .header-inner {
        min-height: 68px;
        flex-wrap: nowrap;
    }
    .lang-switcher a {
        min-height: 38px;
        min-width: 40px;
    }
}

/* ========== Main ========== */
main {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-6) var(--gutter) var(--s-7);
}

@media (min-width: 768px) {
    main {
        padding-top: var(--s-7);
        padding-bottom: var(--s-8);
    }
}

.article-title {
    font-size: var(--fs-h1);
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-strong);
    max-width: 34em;
    margin-bottom: var(--s-6);
    padding-left: var(--s-4);
    border-left: 3px solid var(--accent);
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .article-title {
        margin-bottom: var(--s-7);
        padding-left: var(--s-5);
    }
}

/* ========== Hero ========== */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-5);
    margin-bottom: var(--s-7);
    padding-bottom: var(--s-6);
    border-bottom: var(--line);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-content .lead {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: var(--s-5);
    max-width: var(--measure);
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
    font-size: var(--fs-small);
    color: var(--muted);
    letter-spacing: 0.01em;
}

.meta-info > * + *::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: var(--s-3);
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
    opacity: 0.8;
}

.meta-info a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
}

.hero-visual {
    width: 100%;
    height: 240px;
    border: var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--surface);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 0;
    filter: brightness(0.9);
}

@media (min-width: 480px) {
    .hero-visual {
        height: 300px;
    }
}

@media (min-width: 768px) {
    .hero-visual {
        height: 360px;
    }
    .hero-content .lead {
        font-size: 1.12rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: var(--s-7);
        align-items: center;
        padding-bottom: var(--s-7);
    }
    .hero-visual {
        height: 100%;
        min-height: 400px;
    }
}

/* ========== Article content ========== */
.content-body {
    max-width: var(--measure);
    margin: 0 auto var(--s-7);
    color: var(--text);
}

@media (min-width: 1024px) {
    .content-body {
        margin-left: 0;
    }
}

.content-body > * + * {
    margin-top: var(--s-5);
}

.content-body p {
    font-size: 1rem;
    line-height: var(--lh-base);
    color: var(--text);
    margin-bottom: 0;
}

.content-body h2,
.content-body h3,
.content-body h4 {
    color: var(--text-strong);
    scroll-margin-top: 88px;
}

.content-body h2 {
    font-size: var(--fs-h2);
    margin-top: var(--s-7);
    margin-bottom: 0;
    padding-top: var(--s-5);
    border-top: var(--line);
    position: relative;
}

.content-body h2::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--accent);
}

.content-body h3 {
    font-size: var(--fs-h3);
    margin-top: var(--s-6);
    margin-bottom: 0;
}

.content-body h4 {
    font-size: var(--fs-h4);
    margin-top: var(--s-5);
    color: var(--text-strong);
}

.content-body h2 + *,
.content-body h3 + *,
.content-body h4 + * {
    margin-top: var(--s-3);
}

.content-body > :first-child {
    margin-top: 0;
}

.content-body > h2:first-child {
    border-top: 0;
    padding-top: 0;
}

.content-body > h2:first-child::before {
    display: none;
}

/* Links in content */
.content-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.content-body a:visited {
    color: var(--visited);
}

.content-body a:hover {
    color: var(--accent-hover);
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
}

/* Lists */
.content-body ul,
.content-body ol {
    padding-left: var(--s-5);
    margin-bottom: 0;
}

.content-body ul li,
.content-body ol li {
    position: relative;
    color: var(--text);
    margin-bottom: var(--s-2);
    padding-left: var(--s-2);
    line-height: 1.7;
}

.content-body ul > li {
    list-style: none;
}

.content-body ul > li::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--s-3));
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: var(--accent);
    transform: rotate(45deg);
}

.content-body ul ul > li::before {
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    transform: none;
}

.content-body ol {
    list-style: decimal;
}

.content-body ol > li {
    list-style: decimal;
}

.content-body ol > li::marker {
    color: var(--accent);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.content-body li > ul,
.content-body li > ol {
    margin-top: var(--s-2);
    margin-bottom: var(--s-2);
}

.content-body ul li strong,
.content-body ol li strong {
    color: var(--text-strong);
}

/* Blockquote */
.content-body blockquote,
blockquote {
    margin: var(--s-6) 0;
    padding: var(--s-4) var(--s-5);
    background: var(--surface);
    border: var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--muted);
    font-size: 1.02rem;
    font-style: normal;
    line-height: 1.7;
}

.content-body blockquote p {
    color: var(--muted);
}

.content-body blockquote p + p {
    margin-top: var(--s-3);
}

blockquote cite,
blockquote footer {
    display: block;
    margin-top: var(--s-3);
    font-size: var(--fs-small);
    font-style: normal;
    color: var(--subtle);
    background: none;
    border: 0;
}

/* Tables */
.content-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    border-collapse: separate;
    border-spacing: 0;
}

.content-body thead th,
.content-body th {
    background: var(--raised);
    color: var(--text-strong);
    font-weight: 650;
    text-align: left;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.content-body th,
.content-body td {
    padding: var(--s-3) var(--s-4);
    border-bottom: var(--line);
    vertical-align: top;
    min-width: 120px;
}

.content-body tr:last-child td {
    border-bottom: 0;
}

.content-body tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}

.content-body tbody tr:hover td {
    background: var(--accent-soft);
}

caption {
    caption-side: bottom;
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-small);
    color: var(--muted);
    text-align: left;
}

/* Figure */
figure {
    margin: var(--s-6) 0;
}

figure img {
    width: 100%;
    border: var(--line);
    border-radius: var(--radius);
}

figcaption {
    margin-top: var(--s-2);
    font-size: var(--fs-small);
    color: var(--muted);
    line-height: 1.55;
    padding-left: var(--s-3);
    border-left: 2px solid var(--border-strong);
}

.content-body img {
    border-radius: var(--radius);
    border: var(--line);
}

.content-body hr {
    margin: var(--s-7) 0;
}

.content-body pre {
    margin-top: var(--s-5);
}

/* ========== Related materials ========== */
.related-materials {
    margin-top: var(--s-8);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}

.section-header h2,
.section-header h3 {
    font-size: 0.82rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    white-space: nowrap;
}

.section-header h2::before,
.section-header h3::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: var(--s-2);
    background: var(--accent);
    border-radius: 2px;
    vertical-align: 0.05em;
}

.divider-line {
    flex: 1 1 auto;
    height: 1px;
    min-width: 24px;
    background: var(--border);
}

.cards-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

@media (min-width: 600px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: var(--s-5);
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--s-5);
    background: var(--surface);
    border: var(--line);
    border-radius: var(--radius-lg);
    color: var(--text);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--s-5);
    right: var(--s-5);
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.card:hover {
    background: var(--raised);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 1;
}

.card:focus-within {
    border-color: var(--accent-line);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
    font-size: var(--fs-xs);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: var(--bw) solid var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.6;
}

.badge.accent-badge {
    border-color: rgba(147, 194, 168, 0.4);
    background: var(--accent2-soft);
    color: var(--accent2);
}

.date {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.card h4 {
    font-size: 1.02rem;
    line-height: 1.4;
    font-weight: 650;
    color: var(--text-strong);
    margin-bottom: var(--s-2);
    overflow-wrap: break-word;
}

.card h4 a {
    color: inherit;
}

.card h4 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card:hover h4 {
    color: var(--accent-hover);
}

.card p {
    flex-grow: 1;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: var(--s-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: var(--s-3);
    border-top: var(--line);
    font-size: var(--fs-small);
    font-weight: 550;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.card-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--accent);
}

.card:hover .card-footer {
    color: var(--accent-hover);
}

a.card:visited h4 {
    color: var(--text);
}

/* ========== Footer ========== */
footer {
    margin-top: auto;
    background: var(--surface);
    border-top: var(--line);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--s-6) var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s-4);
}

.footer-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-2) var(--s-3);
    color: var(--muted);
    font-size: var(--fs-small);
}

.footer-left img,
.footer-left svg {
    max-height: 24px;
    width: auto;
    border-radius: 0;
    filter: none;
}

.footer-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-1) var(--s-2);
}

.footer-center a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--s-3);
    color: var(--muted);
    font-size: var(--fs-small);
    border-radius: var(--radius-sm);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
}

.footer-center a:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent-line);
}

.dmca-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 32px;
    padding: var(--s-1) var(--s-3);
    background: var(--raised);
    border: var(--line);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: var(--muted);
    letter-spacing: 0.03em;
    cursor: default;
}

.dmca-badge img,
.dmca-badge svg {
    max-height: 18px;
    width: auto;
    border-radius: 0;
    filter: none;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: var(--s-5);
    }
    .footer-left,
    .footer-center {
        justify-content: flex-start;
    }
    .footer-center a {
        min-height: 36px;
    }
}

/* ========== Utilities / safety ========== */
.content-body *,
.hero-content * {
    max-width: 100%;
}

.content-body pre,
.content-body table {
    max-width: 100%;
}

@media (hover: none) {
    .card:hover {
        transform: none;
    }
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ========== Print ========== */
@media print {
    .site-header,
    footer,
    .related-materials {
        display: none;
    }
    body {
        background: #fff;
        color: #111;
    }
    .article-title,
    .content-body h2,
    .content-body h3,
    .content-body p,
    .content-body li {
        color: #111;
    }
}