:root {
    --bg-color: #1a1f2e;
    --card-bg: #242b3d;
    --card-bg-2: #1e2434;
    --accent: #d4a94a;
    --accent-rgb: 212, 169, 74;
    --on-accent: #1a1f2e;
    --accent-green: #34c759;
    --text-main: #ffffff;
    --text-muted: #a8b0bf;
    --text-muted-alt: #a8b0bf;
    --border-color: #3a4358
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 16px;
    max-width: 800px;
    margin: 0 auto
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background-color: var(--accent);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(var(--accent-rgb, 212, 169, 74), 0.5)
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 8px 0;
    gap: 4px
}

.back-link:hover {
    text-decoration: underline
}

/* картинки внутри статьи никогда не шире карточки */
article img {
    max-width: 100%;
    height: auto
}

article {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color)
}

.article-date {
    display: block;
    font-size: 13px;
    color: var(--text-muted-alt);
    margin-bottom: 8px
}

h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3
}

h2 {
    font-size: 18px;
    margin: 20px 0 12px;
    color: var(--text-main)
}

p {
    font-size: 15px;
    color: #d1d1d6;
    margin-bottom: 16px
}

strong {
    color: #ffffff;
    font-weight: 600
}

/* ===== БЛОК ПРОМПТА (ОРИГИНАЛЬНАЯ РАБОЧАЯ ЛОГИКА) ===== */
.prompt-wrapper {
    margin: 20px 0 24px
}

.copy-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px
}

.btn-copy {
    background-color: var(--card-bg-2);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px
}

.btn-copy:active {
    transform: scale(0.97)
}

.btn-copy.copied {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: #fff
}

.btn-copy svg {
    width: 15px;
    height: 15px;
    fill: currentColor
}

.prompt-box {
    background-color: #0b0f19;
    border-left: 4px solid var(--accent);
    padding: 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--accent-green);
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    overflow-x: auto
}

/* ===== Общая шапка/подвал статьи (используется во всех articles/<slug>/index.html) ===== */
.site-header {
    text-align: center;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto
}
.site-header .site-logo {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff
}
.site-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center
}
.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 120px;
    max-width: 170px;
    background-color: var(--accent);
    color: var(--on-accent);
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px
}


.inline-cta {
    background-color: var(--card-bg-2);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 8px;
    margin: 10px 0;
    text-align: center
}
.inline-cta p {
    margin: 0 0 5px;
    font-size: 11px;
    color: #d1d1d6
}
.inline-cta-btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--on-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 5px
}
