/* styles.css — motorbeat.com.ua — light editorial / tech theme: sand paper + terracotta + slate teal */

:root {
    /* Palette */
    --bg: #f4efe6;
    --bg-alt: #ede6da;
    --surface: #fffdf9;
    --card: #fbf7f0;
    --text: #2a2622;
    --text-soft: #3d3832;
    --muted: #625b52;
    --accent: #a13d1e;
    --accent-hover: #7f2d13;
    --accent2: #2d5a5e;
    --accent2-hover: #1f4245;
    --accent-tint: rgba(161, 61, 30, 0.08);
    --accent2-tint: rgba(45, 90, 94, 0.09);
    --warning: #8a4b00;
    --warning-tint: rgba(176, 102, 0, 0.12);

    --line: rgba(42, 38, 34, 0.12);
    --line-soft: rgba(42, 38, 34, 0.07);
    --code-bg: #efe9df;

    --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.05), 0 1px 1px rgba(60, 40, 20, 0.03);
    --shadow-md: 0 6px 22px -10px rgba(60, 40, 20, 0.18), 0 2px 6px rgba(60, 40, 20, 0.04);
    --shadow-lg: 0 18px 40px -18px rgba(60, 40, 20, 0.25);

    /* Radius */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* Typography */
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-head: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;

    --fs-base: 1.03125rem;
    --fs-small: 0.875rem;
    --fs-xs: 0.75rem;
    --fs-h1: 1.3rem;
    --fs-h2: 1.2rem;
    --fs-h3: 1.075rem;
    --lh-body: 1.7;
    --lh-head: 1.3;
    --measure: 70ch;

    /* Spacing scale */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 18px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 72px;

    --gutter: 16px;
    --container: 1200px;
    --header-h: 64px;
}

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

@media (min-width: 768px) {
    :root {
        --gutter: 28px;
        --fs-h1: 1.65rem;
        --fs-h2: 1.3rem;
        --fs-h3: 1.125rem;
        --space-md: 22px;
        --space-lg: 40px;
        --space-xl: 60px;
    }
}

@media (min-width: 1024px) {
    :root {
        --fs-base: 1.09375rem;
        --fs-h1: 1.875rem;
        --fs-h2: 1.4rem;
        --fs-h3: 1.175rem;
        --gutter: 32px;
        --space-xl: 72px;
        --space-2xl: 96px;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(42, 38, 34, 0.045) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: var(--lh-body);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg, iframe, embed, object {
    display: block;
    max-width: 100%;
}

img, video {
    height: auto;
}

iframe {
    border: 0;
    width: 100%;
}

svg {
    flex-shrink: 0;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

::selection {
    background: rgba(161, 61, 30, 0.18);
    color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: var(--lh-head);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.012em;
    overflow-wrap: break-word;
    hyphens: auto;
}

strong, b {
    font-weight: 650;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244, 239, 230, 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0 64px, var(--accent2) 64px 96px, transparent 96px);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-xs) var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-md);
    row-gap: 0;
    min-height: 56px;
}

.logo-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    text-transform: lowercase;
}

.logo-name::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 5px 5px 0 -1px var(--accent2);
    flex-shrink: 0;
}

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

.logo-name a {
    color: inherit;
}

.main-nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: var(--space-2xs);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) var(--space-2xs);
    border-top: 1px dashed var(--line-soft);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    white-space: nowrap;
    color: var(--muted);
    border-radius: var(--radius-sm);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.main-nav a.active {
    color: var(--accent);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--bg-alt);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 38px;
    padding: 0 10px;
    color: var(--muted);
    border-radius: var(--radius-pill);
}

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

.lang-switcher a.active {
    color: #fff;
    background: var(--accent);
}

@media (min-width: 768px) {
    .header-inner {
        flex-wrap: nowrap;
        min-height: var(--header-h);
    }

    .main-nav {
        order: 0;
        flex: 0 1 auto;
        margin: 0 0 0 auto;
        padding: 0;
        border-top: 0;
        overflow: visible;
        gap: var(--space-2xs);
    }
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
main {
    display: block;
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg) var(--gutter) var(--space-xl);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.hero-visual {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-alt), #e2d6c4);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-md);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 60%, rgba(42, 38, 34, 0.14));
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.hero-visual:hover img {
    transform: scale(1.025);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-tint);
    border: 1px solid rgba(45, 90, 94, 0.22);
    border-radius: var(--radius-sm);
}

.hero-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.article-title {
    font-family: var(--font-head);
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.018em;
    color: var(--text);
    max-width: 34ch;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.lead {
    font-size: 1.02em;
    line-height: 1.7;
    color: var(--muted);
    max-width: 60ch;
}

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.meta-item .label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta-item .value {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.meta-divider {
    display: none;
    width: 1px;
    align-self: stretch;
    background: var(--line);
}

@media (min-width: 480px) {
    .meta-divider {
        display: block;
    }
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: var(--space-xl);
    }

    .hero-visual {
        aspect-ratio: 4 / 5;
        max-height: 620px;
        width: 100%;
    }
}

/* =============================================
   CONTENT WRAPPER
   ============================================= */
.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
    margin-bottom: var(--space-xl);
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: var(--space-xl);
    }
}

@media (min-width: 1280px) {
    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.content-body {
    min-width: 0;
    max-width: var(--measure);
    width: 100%;
    margin-inline: auto;
    overflow-wrap: break-word;
}

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

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

.content-body p {
    margin-bottom: 1.25em;
    color: var(--text-soft);
    line-height: 1.72;
}

.content-body h2 {
    position: relative;
    margin: 2.2em 0 0.75em;
    padding-top: 0.9em;
    font-size: var(--fs-h2);
    font-weight: 750;
    color: var(--text);
    border-top: 1px solid var(--line);
}

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

.content-body h3 {
    margin: 1.8em 0 0.6em;
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--accent2);
}

.content-body h4 {
    margin: 1.5em 0 0.5em;
    font-size: 1rem;
    font-weight: 700;
}

.content-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(161, 61, 30, 0.45);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
}

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

.content-body ul,
.content-body ol {
    margin: 0 0 1.35em;
    padding-left: 1.4em;
}

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

.content-body ul > li {
    position: relative;
}

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

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

.content-body ol > li::marker {
    color: var(--accent2);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9em;
}

.content-body li {
    margin-bottom: 0.5em;
    color: var(--text-soft);
    padding-left: 0.2em;
}

.content-body li > ul,
.content-body li > ol {
    margin: 0.5em 0 0;
}

.content-body img,
.content-body video,
.content-body iframe {
    margin: 1.6em 0;
    border-radius: var(--radius);
}

.content-body figure {
    margin: 1.8em 0;
}

.content-body figure img {
    margin: 0;
}

.content-body figcaption {
    margin-top: 0.6em;
    font-size: var(--fs-small);
    color: var(--muted);
}

.content-body hr {
    border: 0;
    height: 1px;
    margin: 2.4em 0;
    background: var(--line);
}

.content-body blockquote {
    position: relative;
    margin: 2em 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 6px);
    background: linear-gradient(90deg, var(--accent2-tint), rgba(45, 90, 94, 0.02));
    border-left: 3px solid var(--accent2);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.08em;
    line-height: 1.6;
    color: var(--text);
}

.content-body blockquote p {
    color: inherit;
    margin-bottom: 0.6em;
}

.content-body blockquote p:last-child {
    margin-bottom: 0;
}

.content-body blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    font-family: var(--font-mono);
    font-style: normal;
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.content-body blockquote cite::before {
    content: "— ";
    color: var(--accent);
}

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

:not(pre) > code {
    padding: 0.12em 0.4em;
    background: var(--code-bg);
    border: 1px solid var(--line-soft);
    border-radius: 4px;
    color: var(--accent-hover);
    overflow-wrap: anywhere;
    word-break: break-word;
}

pre {
    margin: 1.6em 0;
    padding: var(--space-md);
    max-width: 100%;
    overflow-x: auto;
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text);
    tab-size: 4;
    -webkit-overflow-scrolling: touch;
}

pre code {
    font-size: inherit;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    white-space: pre;
}

kbd {
    padding: 0.1em 0.4em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* Tables */
.content-body table,
table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: var(--fs-small);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

th, td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line-soft);
    min-width: 110px;
}

th {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--bg-alt);
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: rgba(237, 230, 218, 0.45);
}

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

tbody tr:last-child td {
    border-bottom: 0;
}

@media (min-width: 768px) {
    .content-body table,
    table {
        display: table;
        overflow: hidden;
    }
}

/* Info Box */
.info-box {
    position: relative;
    margin: 1.6em 0 2em;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 3px 100%;
    background-repeat: no-repeat;
    background-position: left top;
}

.content-body .info-box ul,
.info-box ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-body .info-box ul li,
.info-box ul li {
    position: relative;
    margin: 0;
    padding-left: 22px;
    font-size: 0.96em;
    line-height: 1.65;
    color: var(--text-soft);
}

.content-body .info-box ul li::before,
.info-box ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.7em;
    width: 10px;
    height: 2px;
    background: var(--accent2);
    border-radius: 1px;
    transform: none;
}

.info-box ul li strong {
    color: var(--text);
    font-weight: 700;
}

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
    min-width: 0;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .author-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .author-sidebar {
        position: sticky;
        top: calc(var(--header-h) + 20px);
    }
}

.author-card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.author-avatar {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-alt);
}

@media (min-width: 1024px) {
    .author-avatar {
        aspect-ratio: 4 / 3;
    }
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
}

.author-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.author-name {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.3;
    color: var(--text);
}

.author-bio {
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--muted);
}

.author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-2xs);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--line);
}

.author-socials a,
.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
}

.author-socials a:hover,
.footer-socials a:hover {
    color: #fff;
    background: var(--accent2);
    border-color: var(--accent2);
}

.author-socials svg,
.footer-socials svg {
    width: 18px;
    height: 18px;
}

/* TOC */
.toc-card {
    padding: var(--space-md);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.toc-title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent2);
}

.toc-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.toc-list {
    list-style: none;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: var(--fs-small);
    color: var(--muted);
}

.toc-list li::before {
    content: counter(toc-counter, decimal-leading-zero);
    min-width: 22px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
}

.toc-list li a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 0;
    line-height: 1.4;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.toc-list li a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* =============================================
   RELATED SECTION
   ============================================= */
.related-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--line);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    min-width: 0;
}

.section-header h3 {
    font-size: var(--fs-h2);
    font-weight: 800;
    color: var(--text);
    min-width: 0;
}

.decoder-line {
    flex: 1 1 40px;
    min-width: 24px;
    height: 6px;
    background:
        repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 8px);
    border-radius: 2px;
}

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

@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(250px, 1fr));
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--space-md);
    right: var(--space-md);
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(161, 61, 30, 0.25);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card a {
    color: inherit;
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent2);
    background: var(--accent2-tint);
    border-radius: var(--radius-sm);
}

.badge.warning {
    color: var(--warning);
    background: var(--warning-tint);
}

.card h4 {
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.35;
    color: var(--text);
    overflow-wrap: anywhere;
}

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

.card p {
    flex-grow: 1;
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--muted);
}

.card-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--line);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent2);
    box-shadow: 0 0 0 3px var(--accent2-tint);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    margin-top: var(--space-xl);
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg) var(--gutter) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    min-width: 0;
}

.footer-left .brand {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: lowercase;
    color: var(--text);
}

.footer-left .copy {
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    color: var(--muted);
}

.footer-nav a:first-child {
    padding-left: 0;
}

.footer-nav a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.footer-socials a {
    background: var(--surface);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-md) var(--gutter) var(--space-lg);
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.footer-bottom p {
    font-size: 0.74rem;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
}

/* =============================================
   SUBTLE MOTION
   ============================================= */
@keyframes mbFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.hero-content {
    animation: mbFade 0.5s ease both;
}

.hero-visual {
    animation: mbFade 0.5s ease 0.08s both;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::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;
    }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    header,
    footer,
    .footer-socials,
    .related-section,
    .hero-visual {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}
===end file===
===end file===
===end file===
===end file===
===end file===
===end file===