/* ==========================================================================
   Reset & базовые токены
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Цвета — светлая тема */
    --bg:           #ffffff;
    --bg-soft:      #f7f8fb;
    --bg-elev:      #ffffff;
    --surface:      #ffffff;
    --border:       #e6e8ee;
    --border-soft:  #eef0f5;

    --text:         #0b1020;
    --text-2:       #2a3142;
    --text-muted:   #5b6478;
    --text-faint:   #8a93a6;

    --accent:       #2563eb;
    --accent-2:     #6366f1;
    --accent-hov:   #1d4ed8;
    --accent-soft:  #eef3ff;
    --accent-ring:  rgba(37,99,235,.18);

    --code-fg:      #be185d;
    --code-bg:      #f4f5f8;

    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    20px;

    --shadow-xs:    0 1px 0 rgba(15,23,42,.04);
    --shadow-sm:    0 2px 8px rgba(15,23,42,.04), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md:    0 8px 24px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg:    0 24px 60px -20px rgba(37,99,235,.25), 0 8px 24px -8px rgba(15,23,42,.10);

    --max-width:    1080px;
    --content-width: 760px;

    --ease:         cubic-bezier(.2,.7,.2,1);
}

/* Тёмные значения — общий блок, переиспользуем */
:root[data-theme="dark"],
:root[data-theme="auto"] {
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* Применяется когда тема явно "dark" ИЛИ "auto" + системная тёмная */
:root[data-theme="dark"] {
    --bg:           #0a0d14;
    --bg-soft:      #0d111a;
    --bg-elev:      #11151f;
    --surface:      #11151f;
    --border:       #1e2433;
    --border-soft:  #181d29;

    --text:         #eef1f7;
    --text-2:       #cfd5e3;
    --text-muted:   #8a93a6;
    --text-faint:   #5e677b;

    --accent:       #5b8def;
    --accent-2:     #8b8cff;
    --accent-hov:   #7da4ff;
    --accent-soft:  rgba(91,141,239,.10);
    --accent-ring:  rgba(91,141,239,.25);

    --code-fg:      #f9a8d4;
    --code-bg:      #161b27;

    --shadow-xs:    0 1px 0 rgba(0,0,0,.4);
    --shadow-sm:    0 2px 10px rgba(0,0,0,.35);
    --shadow-md:    0 10px 30px rgba(0,0,0,.45);
    --shadow-lg:    0 30px 80px -20px rgba(91,141,239,.35), 0 10px 30px -8px rgba(0,0,0,.6);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]),
    :root[data-theme="auto"] {
        --bg:           #0a0d14;
        --bg-soft:      #0d111a;
        --bg-elev:      #11151f;
        --surface:      #11151f;
        --border:       #1e2433;
        --border-soft:  #181d29;

        --text:         #eef1f7;
        --text-2:       #cfd5e3;
        --text-muted:   #8a93a6;
        --text-faint:   #5e677b;

        --accent:       #5b8def;
        --accent-2:     #8b8cff;
        --accent-hov:   #7da4ff;
        --accent-soft:  rgba(91,141,239,.10);
        --accent-ring:  rgba(91,141,239,.25);

        --code-fg:      #f9a8d4;
        --code-bg:      #161b27;

        --shadow-xs:    0 1px 0 rgba(0,0,0,.4);
        --shadow-sm:    0 2px 10px rgba(0,0,0,.35);
        --shadow-md:    0 10px 30px rgba(0,0,0,.45);
        --shadow-lg:    0 30px 80px -20px rgba(91,141,239,.35), 0 10px 30px -8px rgba(0,0,0,.6);
    }
}

/* ==========================================================================
   Базовые стили
   ========================================================================== */
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    text-rendering: optimizeLegibility;
}

/* фон с мягкой сеткой и градиентным "сиянием" */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1100px 600px at 80% -10%, rgba(99,102,241,.10), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(37,99,235,.10), transparent 60%);
}

@media (prefers-color-scheme: dark) {
    body::before {
        background:
            radial-gradient(1200px 700px at 85% -10%, rgba(139,140,255,.10), transparent 60%),
            radial-gradient(900px 600px at -10% 10%, rgba(91,141,239,.12), transparent 60%);
    }
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-hov); }

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

/* ==========================================================================
   Header
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in oklab, var(--bg) 80%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
}
.site-title a {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.015em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.site-title a::before {
    content: '';
    display: inline-block;
    width: 26px; height: 26px;
    border-radius: 8px;
    background:
        radial-gradient(120% 120% at 0% 0%, #93c5fd, transparent 50%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.35),
        0 6px 16px -6px var(--accent-ring);
}
nav { display: flex; gap: 2px; align-items: center; }
nav a {
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s var(--ease), background .15s var(--ease);
}
nav a:hover { color: var(--text); background: var(--bg-soft); }

/* Переключатель темы */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.theme-toggle:hover {
    color: var(--text);
    border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
}
.theme-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
    transition: transform .25s var(--ease), opacity .15s var(--ease);
}
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-sun,
    :root[data-theme="auto"] .theme-toggle .icon-sun  { display: none; }
    :root:not([data-theme]) .theme-toggle .icon-moon,
    :root[data-theme="auto"] .theme-toggle .icon-moon { display: block; }
}
.theme-toggle:hover svg { transform: rotate(20deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 24px 88px;
    text-align: center;
    background:
        radial-gradient(700px 380px at 50% 0%, rgba(99,102,241,.10), transparent 60%),
        radial-gradient(800px 400px at 50% 100%, rgba(37,99,235,.06), transparent 60%);
}
/* сетка-подложка */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, color-mix(in oklab, var(--text) 6%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in oklab, var(--text) 6%, transparent) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 50%, transparent 100%);
    pointer-events: none;
}
.hero > * { position: relative; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}

.hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 18px;
}
.hero h1 .grad {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin: 0 auto 36px;
    max-width: 620px;
    line-height: 1.6;
}

/* PowerShell-команда — glass card */
.hero-cmd {
    display: inline-block;
    text-align: left;
    background: color-mix(in oklab, var(--surface) 70%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px 14px 18px;
    box-shadow: var(--shadow-md);
    min-width: min(520px, 100%);
}
.hero-cmd-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: 10px;
}
.hero-cmd-label::before {
    content: '';
    width: 8px; height: 8px; border-radius: 2px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.hero-cmd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 10px 12px;
}
.hero-cmd code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: .95rem;
    font-family: 'JetBrains Mono','SF Mono','Consolas',monospace;
    font-weight: 500;
    white-space: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hero-cmd code::-webkit-scrollbar { display: none; }
.hero-cmd code .tok-kw  { color: var(--accent-2); }
.hero-cmd code .tok-op  { color: var(--text-faint); }

.hero-copy-btn {
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-hov));
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    box-shadow: 0 6px 14px -6px var(--accent-ring), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .12s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease);
}
.hero-copy-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.hero-copy-btn:active { transform: translateY(0); }

/* ==========================================================================
   Categories — bento grid
   ========================================================================== */
.categories { padding: 64px 0 24px; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.section-sub {
    font-size: .9rem;
    color: var(--text-muted);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.category-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.category-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, var(--accent-ring), transparent 60%);
    opacity: 0;
    transition: opacity .25s var(--ease);
}
.category-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.category-card:hover::after { opacity: .35; }

.category-icon {
    width: 44px; height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--accent);
    background:
        radial-gradient(120% 120% at 0% 0%, color-mix(in oklab, var(--accent) 25%, transparent), transparent 60%),
        var(--accent-soft);
    border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--border));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.category-icon svg { width: 22px; height: 22px; stroke: currentColor; }

.category-card .meta { min-width: 0; }
.category-card h3 {
    font-size: .98rem;
    font-weight: 600;
    color: var(--text);
    margin: 2px 0 4px;
    letter-spacing: -0.01em;
}
.category-card p {
    font-size: .84rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
.category-card .arrow {
    margin-left: auto;
    color: var(--text-faint);
    transition: transform .2s var(--ease), color .2s var(--ease);
}
.category-card:hover .arrow { color: var(--accent); transform: translateX(2px); }

/* ==========================================================================
   Recent articles
   ========================================================================== */
.recent { padding: 56px 0 80px; }
.article-list { display: flex; flex-direction: column; }
.article-preview {
    max-width: none;
    margin: 0;
    padding: 22px 0;
    border-bottom: 1px solid var(--border-soft);
    transition: padding-left .2s var(--ease);
}
.article-preview:first-child { padding-top: 0; }
.article-preview:last-child { border-bottom: none; }
.article-preview:hover { padding-left: 4px; }
.article-preview h2,
.article-preview h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.article-preview h2 a,
.article-preview h3 a { color: var(--text); }
.article-preview h2 a:hover,
.article-preview h3 a:hover { color: var(--accent); text-decoration: none; }
.article-preview p {
    font-size: .92rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.55;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--accent);
}
.read-more::after {
    content: '→';
    transition: transform .2s var(--ease);
}
.read-more:hover::after { transform: translateX(3px); }

/* ==========================================================================
   Article (single)
   ========================================================================== */
main.container { padding-top: 36px; padding-bottom: 80px; }

article { max-width: var(--content-width); margin: 0 auto; }
article h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 12px;
}
article h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 40px 0 14px;
    letter-spacing: -0.02em;
    scroll-margin-top: 90px;
}
article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 28px 0 10px;
    letter-spacing: -0.01em;
}
article p {
    margin-bottom: 16px;
    color: var(--text-2);
    font-size: 1rem;
}
article ul, article ol { margin: 16px 0; padding-left: 26px; }
article li { margin-bottom: 8px; color: var(--text-2); }
article li::marker { color: var(--text-faint); }
article strong { color: var(--text); font-weight: 600; }

article blockquote {
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 10px 10px 0;
    color: var(--text-2);
    font-size: .98rem;
}

article a:not(.read-more) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklab, var(--accent) 35%, transparent);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s var(--ease);
}
article a:not(.read-more):hover { text-decoration-color: var(--accent); }

/* ==========================================================================
   Code
   ========================================================================== */
code {
    background: var(--code-bg);
    border: 1px solid var(--border-soft);
    padding: 1px 6px;
    border-radius: 6px;
    font-family: 'JetBrains Mono','SF Mono','Consolas',monospace;
    font-size: .87em;
    color: var(--code-fg);
}

/* Универсальный код-блок (и обычный <pre>, и chroma .highlight) */
.highlight,
.content > pre,
.content p + pre {
    position: relative;
    margin: 22px 0;
    border-radius: var(--radius);
    border: 1px solid #1b2236;
    background: linear-gradient(180deg, #0e1422 0%, #0a0f1c 100%) !important;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Убираем хромовский inline-стиль на внутреннем div */
.highlight > div {
    background: transparent !important;
    color: #e2e8f0 !important;
    margin: 0 !important;
}

/* Сбрасываем chroma-таблицу (lineNos) — превращаем в единый flow */
.highlight table {
    width: 100%;
    border: 0;
    border-spacing: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    display: block;
}
.highlight table tbody,
.highlight table tr { display: block; }
.highlight table td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
/* Прячем первую ячейку с номерами строк (если они есть) */
.highlight table td:first-child { display: none; }
.highlight table td:last-child { width: 100%; }
.highlight table tr:hover td { background: transparent !important; }

/* Переопределяем chroma <pre>, который идёт с inline-style */
.highlight pre,
.content > pre {
    background: transparent !important;
    color: #e2e8f0 !important;
    border: 0 !important;
    border-radius: 0;
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    box-shadow: none;
    font-family: 'JetBrains Mono','SF Mono','Consolas',monospace;
    font-size: .9rem;
    line-height: 1.65;
}
.highlight pre code,
.content > pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Кнопка копирования — всегда видна, по центру справа */
.copy-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 6px 11px;
    font-size: .75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.copy-btn::before {
    content: '';
    width: 12px; height: 12px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='9' width='13' height='13' rx='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>") center/contain no-repeat;
}
.copy-btn:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
    border-color: rgba(255,255,255,.22);
    transform: translateY(-50%) scale(1.02);
}
.copy-btn:active { transform: translateY(-50%) scale(.97); }
.copy-btn.is-copied {
    background: rgba(34,197,94,.20);
    color: #86efac;
    border-color: rgba(34,197,94,.35);
}
.copy-btn.is-copied::before {
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}

/* Добавляем правый отступ к коду чтобы текст не уезжал под кнопку */
.highlight pre,
.content > pre { padding-right: 130px; }

/* ==========================================================================
   Screenshots (figure)
   ========================================================================== */
.screenshot {
    margin: 22px 0;
    padding: 0;
    text-align: center;
}
.screenshot img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 0 auto;
}
.screenshot figcaption {
    margin-top: 10px;
    font-size: .85rem;
    color: var(--text-muted);
    font-style: italic;
}
.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    aspect-ratio: 16 / 9;
    max-width: 720px;
    margin: 0 auto;
    background:
        repeating-linear-gradient(
            45deg,
            color-mix(in oklab, var(--text) 4%, var(--bg)) 0 12px,
            color-mix(in oklab, var(--text) 6%, var(--bg)) 12px 24px
        );
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-faint);
    font-size: .85rem;
}
.screenshot-placeholder span {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    font-weight: 600;
}
.screenshot-placeholder code {
    background: var(--code-bg);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: .8rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    font-size: .92rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); }
tbody tr:last-child td { border-bottom: none; }
th {
    background: var(--bg-soft);
    font-weight: 600;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}
tr:hover td { background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }

/* ==========================================================================
   Article meta, breadcrumbs, related
   ========================================================================== */
.article-meta {
    display: flex;
    gap: 14px;
    color: var(--text-faint);
    font-size: .82rem;
    margin-bottom: 32px;
    align-items: center;
}
.article-meta time { color: var(--text-faint); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta span::before {
    content: '·';
    color: var(--text-faint);
    margin-right: 4px;
}
.article-meta time::before { content: none; }
.article-meta > :first-child::before { content: none !important; }

.breadcrumbs {
    font-size: .82rem;
    color: var(--text-faint);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs span { color: var(--text-faint); }

.related {
    max-width: var(--content-width);
    margin: 56px auto 0;
    padding-top: 36px;
    border-top: 1px solid var(--border-soft);
}
.related h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.related ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 18px;
}
.related ul li {
    margin: 0;
}
.related ul li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .92rem;
    color: var(--text-2);
    padding: 4px 0;
}
.related ul li a:hover { color: var(--accent); text-decoration: none; }
.related ul li a::before {
    content: '↗';
    color: var(--text-faint);
    font-size: .85em;
    transition: transform .15s var(--ease), color .15s var(--ease);
}
.related ul li a:hover::before { color: var(--accent); transform: translate(1px, -1px); }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border-soft);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
    margin-top: 40px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .related ul { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-inner { padding: 0 16px; height: 58px; }
    nav { display: none; }
    .hero { padding: 64px 20px 56px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-cmd { min-width: 0; width: 100%; }
    .hero-cmd-row { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-copy-btn { width: 100%; padding: 10px 14px; }
    article h1 { font-size: 1.55rem; }
    .container { padding: 0 16px; }
    .categories { padding-top: 44px; }
    .recent { padding: 40px 0 56px; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
    .hero { padding: 56px 16px 48px; }
    .hero h1 { font-size: 1.75rem; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
