/* ============================================================
   Article — design collectheque15
   ============================================================ */

:root {
    --ar-accent: #6c5ce7;
    --ar-accent-deep: #4a3dbd;
    --ar-card: #ffffff;
    --ar-ink: #211f33;
    --ar-ink-soft: #6e6b80;
    --ar-ink-faint: #9b98ab;
    --ar-line: #e9e7df;
    --ar-gold: #f0b429;
    --ar-radius: 20px;
    --ar-shadow-card: 0 1px 2px rgba(33,31,51,0.04), 0 8px 22px rgba(33,31,51,0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 1.25rem 80px;
}
.article, .comments {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 640px) { .container { padding: 12px 1rem 60px; } }

.loading {
    text-align: center; padding: 60px 20px; color: var(--ar-ink-faint); font-size: 15px;
}

/* ----- Tag chip ----- */
.tag-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px;
    color: var(--ar-accent-deep);
    background: color-mix(in oklab, var(--ar-accent) 12%, white);
    border: 1px solid color-mix(in oklab, var(--ar-accent) 22%, white);
    padding: 4px 11px; border-radius: 999px;
}
.tag-chip.gold {
    color: #9a6b00;
    background: color-mix(in oklab, var(--ar-gold) 20%, white);
    border-color: color-mix(in oklab, var(--ar-gold) 34%, white);
}

/* ----- Article top ----- */
.article-top {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 16px; margin-bottom: 26px;
}
.article-title {
    margin: 4px 0 0;
    font-size: 42px; font-weight: 800;
    letter-spacing: -1px; line-height: 1.1;
    color: var(--ar-ink);
}
.byline {
    display: flex; align-items: center; gap: 12px;
}
.byline-av {
    width: 44px; height: 44px; font-size: 17px;
    border-radius: 50%; flex-shrink: 0;
}
img.byline-av { object-fit: cover; }
.av-letter {
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
    background: linear-gradient(135deg, var(--ar-accent), var(--ar-accent-deep));
}
.byline-text { display: flex; flex-direction: column; }
.byline-author { font-size: 15px; font-weight: 700; color: var(--ar-ink); }
.byline-meta { font-size: 13.5px; color: var(--ar-ink-faint); }

/* ----- Hero ----- */
.hero {
    position: relative; border-radius: var(--ar-radius);
    overflow: hidden; box-shadow: var(--ar-shadow-card);
    margin-bottom: 36px;
}
.hero-photo { display: block; width: 100%; height: 420px; object-fit: cover; }
.cover-emoji {
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.cover-emoji::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.22) 1px, transparent 0);
    background-size: 20px 20px; opacity: 0.6;
    pointer-events: none;
}
.hero-emoji { height: 360px; }
.cover-emoji .em {
    position: relative; z-index: 1;
    font-size: 92px;
    filter: drop-shadow(0 6px 14px rgba(33,31,51,0.18));
}

/* ----- Prose ----- */
.prose { color: var(--ar-ink); }
.prose h2 {
    font-size: 25px; font-weight: 800; letter-spacing: -0.4px;
    margin: 38px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
    font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
    margin: 30px 0 12px;
}
.prose p {
    font-size: 18.5px; line-height: 1.72;
    margin: 0 0 22px; color: #3a3850;
}
.prose strong { font-weight: 700; color: var(--ar-ink); }
.prose ul, .prose ol { font-size: 18.5px; line-height: 1.72; color: #3a3850; margin: 0 0 22px; padding-left: 1.4em; }
.prose li { margin: 0.3em 0; }
.prose blockquote {
    margin: 22px 0;
    padding: 6px 18px;
    border-left: 4px solid var(--ar-accent);
    color: var(--ar-ink-soft);
    font-style: italic;
}
.prose img { max-width: 100%; border-radius: 12px; margin: 16px 0; }
.prose a { color: var(--ar-accent); text-decoration: underline; text-underline-offset: 2px; }

.font-serif .prose p,
.font-serif .prose ul,
.font-serif .prose ol,
.font-serif .prose blockquote {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 20px; line-height: 1.7;
}
.font-serif .prose p strong { font-weight: 600; }

/* ----- Foot ----- */
.article-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin-top: 30px; padding-top: 22px;
    border-top: 1px solid var(--ar-line);
}
.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
    font-size: 15px; font-weight: 700; color: var(--ar-accent);
}
.back-link .arrow { transition: transform 0.16s; display: inline-block; }
.back-link:hover .arrow { transform: translateX(-4px); }
.share { display: flex; align-items: center; gap: 10px; }
.share-label { font-size: 13.5px; color: var(--ar-ink-faint); font-weight: 600; }
.share-btn {
    width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--ar-line); background: #fff;
    color: var(--ar-ink-soft); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s, color 0.15s;
}
.share-btn:hover { border-color: var(--ar-accent); color: var(--ar-accent); }

/* ----- Comments ----- */
.comments { margin-top: 50px; }
.comments-title {
    display: flex; align-items: center; gap: 11px;
    font-size: 22px; font-weight: 800; letter-spacing: -0.4px;
    margin: 0 0 22px;
    color: var(--ar-ink);
}
.comments-count {
    font-size: 14px; font-weight: 700;
    color: var(--ar-accent-deep);
    background: color-mix(in oklab, var(--ar-accent) 12%, white);
    border-radius: 999px; padding: 3px 12px;
}

.comment-form {
    display: flex; gap: 14px;
    background: var(--ar-card); border: 1px solid var(--ar-line);
    border-radius: 16px; box-shadow: var(--ar-shadow-card);
    padding: 18px; margin-bottom: 30px;
}
.form-av {
    width: 42px; height: 42px; font-size: 16px;
    border-radius: 50%; flex-shrink: 0;
}
img.form-av { object-fit: cover; }
.form-main { flex: 1; min-width: 0; }
.comment-input {
    width: 100%; min-height: 58px; resize: none;
    font: inherit; font-size: 15.5px; color: var(--ar-ink);
    background: #faf9f6; border: 1px solid var(--ar-line);
    border-radius: 12px; padding: 13px 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.comment-input::placeholder { color: var(--ar-ink-faint); }
.comment-input:focus {
    border-color: var(--ar-accent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--ar-accent) 16%, transparent);
    background: #fff;
}
.form-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 12px;
}
.form-hint { font-size: 12.5px; color: var(--ar-ink-faint); }
.btn-comment {
    font: inherit; font-size: 14.5px; font-weight: 700;
    color: #fff;
    background: var(--ar-accent); border: 1px solid var(--ar-accent);
    border-radius: 999px; padding: 10px 22px;
    cursor: pointer;
    transition: filter 0.15s, opacity 0.15s;
    box-shadow: 0 6px 16px color-mix(in oklab, var(--ar-accent) 30%, transparent);
}
.btn-comment:hover:not(:disabled) { filter: brightness(1.07); }
.btn-comment:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

.comment-login-hint {
    text-align: center; padding: 22px;
    color: var(--ar-ink-soft); font-size: 14.5px;
    background: var(--ar-card); border: 1px dashed var(--ar-line);
    border-radius: 16px; margin-bottom: 30px;
}

.comment-list { display: flex; flex-direction: column; gap: 4px; }
.comment {
    display: flex; gap: 14px;
    padding: 18px 4px;
}
.comment + .comment { border-top: 1px solid var(--ar-line); }
.comment-av, .comment-av-img, .comment-av-letter {
    width: 42px; height: 42px; font-size: 16px;
    border-radius: 50%; flex-shrink: 0;
}
.comment-av { display: block; }
.comment-av-img, .comment-av-letter { display: flex; }
img.comment-av-img { object-fit: cover; }
.comment-main { flex: 1; min-width: 0; }
.comment-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 5px; flex-wrap: wrap;
}
.comment-author {
    font-size: 15px; font-weight: 700;
    color: var(--ar-ink); text-decoration: none;
}
.comment-author:hover { color: var(--ar-accent); }
.comment-date { font-size: 13px; color: var(--ar-ink-faint); }
.comment-del {
    margin-left: auto;
    font: inherit; font-size: 13px; font-weight: 600;
    color: #c0392b; background: none; border: none;
    cursor: pointer; padding: 0;
}
.comment-del:hover { text-decoration: underline; }
.comment-text {
    margin: 0;
    font-size: 15.5px; line-height: 1.55;
    color: #3a3850;
    white-space: pre-wrap;
}
.comments-empty {
    color: var(--ar-ink-faint); font-size: 15px; padding: 8px 4px;
}

@media (max-width: 600px) {
    .article-title { font-size: 32px; }
    .hero-emoji { height: 240px; }
    .hero-photo { height: 260px; }
    .prose p, .prose ul, .prose ol { font-size: 16.5px; }
    .font-serif .prose p, .font-serif .prose ul, .font-serif .prose ol { font-size: 18px; }
    .article-foot { flex-wrap: wrap; }
}
