/* styles.css — mcgm.mk.ua — "Lavender Ledger": editorial / tech, light theme */

:root {
    /* Palette */
    --bg: #f5f3f7;
    --surface: #ffffff;
    --card: #faf9fc;
    --text: #25202b;
    --muted: #5d5667;
    --accent: #6b2a5c;
    --accent2: #8a5c12;

    --accent-hover: #521f47;
    --accent-soft: rgba(107, 42, 92, 0.08);
    --accent-softer: rgba(107, 42, 92, 0.045);
    --accent2-soft: rgba(138, 92, 18, 0.1);
    --line: rgba(37, 32, 43, 0.1);
    --line-strong: rgba(37, 32, 43, 0.18);
    --code-bg: #efecf3;
    --warn: #9a3d1c;
    --warn-soft: rgba(154, 61, 28, 0.09);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(37, 32, 43, 0.04), 0 1px 1px rgba(37, 32, 43, 0.03);
    --shadow-md: 0 2px 4px rgba(37, 32, 43, 0.03), 0 8px 24px -8px rgba(60, 30, 70, 0.1);
    --shadow-lg: 0 4px 10px rgba(37, 32, 43, 0.04), 0 18px 40px -16px rgba(80, 30, 80, 0.16);

    /* Radii */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-pill: 999px;

    /* Typography */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --fs-base: 1.03rem;
    --fs-sm: 0.9rem;
    --fs-xs: 0.78rem;
    --fs-h1: clamp(1.25rem, 1.05rem + 1.1vw, 1.45rem);
    --fs-h2: 1.25rem;
    --fs-h3: 1.1rem;
    --lh-body: 1.7;
    --lh-head: 1.3;
    --measure: 70ch;

    /* Spacing scale */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 72px;
    --gutter: 16px;
    --container: 1200px;
    --header-h: 64px;

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

@media (min-width: 768px) {
    :root {
        --fs-base: 1.075rem;
        --fs-h2: 1.4rem;
        --fs-h3: 1.18rem;
        --gutter: 28px;
        --space-lg: 40px;
        --space-xl: 60px;
    }
}

@media (min-width: 1024px) {
    :root {
        --fs-base: 1.1rem;
        --fs-h1: clamp(1.6rem, 1rem + 1.1vw, 1.95rem);
        --fs-h2: 1.5rem;
        --fs-h3: 1.25rem;
        --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(107, 42, 92, 0.055) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

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

img, video { height: auto; }
iframe { border: 0; }

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

ul, ol { list-style: none; }

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

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

:focus { outline: none; }

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

::selection {
    background: rgba(107, 42, 92, 0.18);
    color: var(--text);
}

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

p { overflow-wrap: break-word; }

hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: var(--space-lg) 0;
}

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

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

.logo-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.logo-name::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 4px 4px 0 var(--accent2-soft);
    transform: rotate(45deg);
}

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

.main-nav {
    order: 3;
    flex: 1 0 100%;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 6px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

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

.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 var(--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;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

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

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

@media (min-width: 768px) {
    :root { --header-h: 72px; }

    .header-inner {
        flex-wrap: nowrap;
        padding: 12px var(--gutter);
    }

    .main-nav {
        order: 0;
        flex: 0 1 auto;
        margin: 0 0 0 auto;
        padding: 0;
        overflow: visible;
    }
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
main {
    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;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e7dfeb, #efe6d8);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

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

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

.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: 5px 12px;
    border: 1px solid rgba(138, 92, 18, 0.28);
    border-radius: var(--radius-pill);
    background: var(--accent2-soft);
    color: var(--accent2);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.hero-tag::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.article-title,
h1 {
    font-family: var(--font-serif);
    font-size: var(--fs-h1);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    max-width: 38ch;
    overflow-wrap: anywhere;
    hyphens: auto;
    text-wrap: balance;
}

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

.meta-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: var(--space-sm) var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--line-strong);
}

.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-sm);
    font-weight: 500;
    color: var(--text);
    overflow-wrap: anywhere;
}

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

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

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: var(--space-xl);
        margin-bottom: var(--space-2xl);
    }

    .hero-visual { aspect-ratio: 4 / 5; }
}

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

.author-sidebar { order: -1; }

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

    .author-sidebar {
        order: 0;
        position: sticky;
        top: calc(var(--header-h) + 20px);
    }
}

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

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.content-body {
    min-width: 0;
    max-width: var(--measure);
}

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

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

.content-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(107, 42, 92, 0.4);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
}

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

.content-body strong, .content-body b { font-weight: 650; }

.content-body h2 {
    position: relative;
    margin: 2.2em 0 0.7em;
    padding-top: 0.9em;
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--text);
}

.content-body h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent) 0 60%, var(--accent2) 60% 100%);
}

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

.content-body h4 {
    margin: 1.5em 0 0.5em;
    font-size: 1.02em;
    color: var(--text);
}

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

/* Lists */
.content-body ul,
.content-body ol {
    margin: 0 0 1.25em;
    padding-left: 1.4em;
}

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

.content-body ul > li {
    position: relative;
    padding-left: 0.3em;
}

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

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

.content-body ol > li { padding-left: 0.3em; }

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

.content-body li + li { margin-top: 0.45em; }

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

/* Blockquote */
.content-body blockquote {
    position: relative;
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 4px);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: linear-gradient(90deg, var(--accent-soft), var(--accent-softer) 60%, transparent);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.08em;
    line-height: 1.6;
    color: var(--text);
}

.content-body blockquote p {
    font-size: inherit;
    line-height: 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.04em;
    color: var(--muted);
}

.content-body blockquote cite::before { content: "— "; }

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

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

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

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

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

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

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

main table th {
    background: var(--card);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

main table tbody tr:nth-child(even) { background: rgba(245, 243, 247, 0.6); }
main table tbody tr:hover { background: var(--accent-softer); }
main table tr:last-child td { border-bottom: 0; }

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

/* Media inside article */
.content-body img,
.content-body video,
.content-body iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: var(--space-md) 0;
}

.content-body iframe { width: 100%; aspect-ratio: 16 / 9; }

.content-body figure { margin: var(--space-lg) 0; }

.content-body figcaption {
    margin-top: var(--space-xs);
    font-size: var(--fs-xs);
    color: var(--muted);
}

/* Info Box */
.info-box {
    position: relative;
    margin: var(--space-md) 0 var(--space-lg);
    padding: var(--space-md);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    opacity: 0.85;
}

.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: 26px;
    color: var(--text);
    font-size: 0.97em;
    line-height: 1.65;
}

.content-body .info-box ul > li::before,
.info-box ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.5em;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    border-radius: 3px;
    background: var(--accent-soft);
    transform: none;
}

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

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
}

.author-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.author-avatar {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e7dfeb, #efe6d8);
}

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

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

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

.author-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    overflow-wrap: anywhere;
}

.author-bio {
    font-size: var(--fs-sm);
    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 solid var(--line);
}

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

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

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

@media (min-width: 480px) and (max-width: 1023px) {
    .author-card { grid-template-columns: 180px minmax(0, 1fr); }

    .author-avatar {
        aspect-ratio: auto;
        height: 100%;
        min-height: 200px;
    }
}

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

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

.toc-title {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px dashed var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

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

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

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

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

.toc-list li a:hover {
    color: var(--accent);
    text-decoration-color: rgba(107, 42, 92, 0.45);
}

/* =============================================
   RELATED SECTION
   ============================================= */
.related-section {
    margin-top: var(--space-lg);
    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-family: var(--font-serif);
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--text);
    min-width: 0;
    overflow-wrap: anywhere;
}

.decoder-line {
    flex: 1 1 40px;
    min-width: 24px;
    height: 6px;
    background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center;
}

.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);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(107, 42, 92, 0.25);
    box-shadow: var(--shadow-lg);
}

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

.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;
    border-radius: var(--radius-xs);
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.card h4 {
    font-family: var(--font-serif);
    font-size: 1.06rem;
    font-weight: 700;
    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-sm);
    line-height: 1.6;
    color: var(--muted);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--line);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    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-soft);
}

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

.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: 4px;
    min-width: 0;
}

.footer-left .brand {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
}

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

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

.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.3em;
}

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

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

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

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

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

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

.footer-bottom p {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.6;
    letter-spacing: 0.03em;
    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 ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-visual { animation: fadeUp 0.5s var(--ease) both; }
.hero-content { animation: fadeUp 0.5s var(--ease) 0.08s both; }
.content-body { animation: fadeUp 0.45s var(--ease) 0.15s both; }

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

    *, *::before, *::after {
        animation-duration: 0.01ms
!important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .card:hover { transform: none; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
    *, *::before, *::after {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        color: #000;
        font-size: 11pt;
        line-height: 1.5;
    }

    header,
    footer,
    .footer-socials,
    .footer-nav,
    .decoder-line {
        display: none !important;
    }

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

    .card {
        break-inside: avoid;
        border: 1px solid #999;
        transform: none !important;
    }

    .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .hero-visual,
    .hero-content,
    .content-body {
        animation: none !important;
    }
}
===end file===
===end file===
===end file===
===end file===
===end file===
===end file===