/* Hallmark · built: the project · redesign: polish · floor pass on the subscription pages: tokens, sentence-case labels, explicit motion */
/* Hallmark · pre-emit critique: polish only, layout and brand kept; colours and fonts now resolve through :root tokens */
:root {
    /* Direction A, "Стрічка": light paper, ink type, and the three level
       colours (green, amber, red) as the only accents. */
    --bg: #FFFFFF;
    --bg-alt: #F2F4F7;
    --card: #FFFFFF;
    --card-border: #E3E6EB;
    --text: #2B2F38;
    --text-muted: #5B6170;
    --accent: #14161B;
    --accent-light: #1B6B47;
    --success: #1B8A5A;
    --warning: #B7791F;
    --danger: #C2412D;
    --radius: 14px;
    --text-strong: #14161B;
    --on-accent: #FFFFFF;
    --accent-hover: #2F333D;
    --accent-2: #1B8A5A;
    --star: #D99A1E;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --accent-wash-faint: rgba(20, 22, 27, 0.02);
    --accent-wash-soft: rgba(20, 22, 27, 0.04);
    --accent-wash: rgba(20, 22, 27, 0.05);
    --accent-wash-strong: rgba(20, 22, 27, 0.06);
    --accent-wash-bold: rgba(20, 22, 27, 0.08);
    --accent-glow: rgba(20, 22, 27, 0.1);
    --accent-line: rgba(20, 22, 27, 0.14);
    --accent-line-scroll: rgba(20, 22, 27, 0.12);
    --accent-line-strong: rgba(20, 22, 27, 0.2);
    --accent-line-bold: rgba(20, 22, 27, 0.24);
    --accent-2-wash: rgba(27, 138, 90, 0.1);
    --success-wash: rgba(27, 138, 90, 0.08);
    --success-line: rgba(27, 138, 90, 0.3);
    --danger-wash: rgba(194, 65, 45, 0.08);
    --veil-02: rgba(20, 22, 27, 0.02);
    --veil-04: rgba(20, 22, 27, 0.03);
    --veil-05: rgba(20, 22, 27, 0.04);
    --veil-06: rgba(20, 22, 27, 0.05);
    --veil-08: rgba(20, 22, 27, 0.06);
    --veil-10: rgba(20, 22, 27, 0.08);
    --shadow: rgba(20, 22, 27, 0.12);
    --shadow-strong: rgba(20, 22, 27, 0.2);
    --lvl-0: #1B8A5A;
    --lvl-1: #D9A12B;
    --lvl-2: #C2412D;
    --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .btn-curator, .nav-links a, .footer-links a { transition: none; }
    .btn-primary:hover { transform: none; }
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0; inset-inline-start: 0; inset-inline-end: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}
.logo-icon { font-size: 28px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-lang { font-size: 12px; padding: 4px 8px; border: 1px solid var(--card-border); border-radius: 4px; }

/* ── Page body ── */
.page-body {
    padding-top: 80px;
    padding-bottom: 64px;
}

/* ── Detail card ── */
.detail-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 20px;
}
.detail-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}
.detail-icon { font-size: 48px; line-height: 1; flex-shrink: 0; }
.detail-title-group { flex: 1; min-width: 0; }
.detail-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 6px;
}
.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}
.meta-sep { opacity: 0.4; }
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.platform-youtube { background: var(--yt-wash); border: 1px solid var(--yt-line); color: var(--yt-ink); }
.platform-linkedin { background: var(--li-wash); border: 1px solid var(--li-line); color: var(--li-ink); }
.platform-x { background: var(--veil-06); border: 1px solid var(--veil-15); color: var(--x-ink); }
.platform-reddit { background: var(--rd-wash); border: 1px solid var(--rd-line); color: var(--rd-ink); }
.channel-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: var(--accent-wash-mid);
    border: 1px solid var(--accent-line);
    color: var(--accent-light);
}
.detail-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.65;
    margin-top: 16px;
}

/* ── Section cards ── */
.section-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.section-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.level-note { font-size: 14px; color: var(--text-muted); }

/* ── CTA button ── */
.cta-section { margin-bottom: 20px; }
.cta-note { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; min-height: 1.2em; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    width: 100%;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.btn-secondary:hover { border-color: var(--accent); }

/* ── Reviews ── */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.review-item {
    padding: 16px;
    background: var(--veil-03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
}
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.review-stars { color: var(--warning); font-size: 13px; }
.review-author { font-size: 12px; color: var(--text-muted); }
.review-text { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.reviews-empty { font-size: 14px; color: var(--text-muted); font-style: italic; }

/* ── Changelog / transparency block ── */
.appeal-stats-line { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.changelog-list { display: flex; flex-direction: column; gap: 10px; }
.changelog-item {
    padding: 12px 14px;
    background: var(--veil-03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
}
.changelog-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.changelog-action {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--veil-06);
    color: var(--text-muted);
}
.changelog-add    { background: var(--log-add-wash); color: var(--log-add-ink); }
.changelog-remove { background: var(--log-remove-wash); color: var(--log-remove-ink); }
.changelog-retire { background: var(--log-retire-wash); color: var(--log-retire-ink); }
.changelog-name { font-size: 14px; color: var(--text); word-break: break-word; }
.changelog-meta { font-size: 12px; color: var(--text-muted); }

/* ── Curator block ── */
.curator-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.curator-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.curator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.curator-name { font-size: 15px; font-weight: 700; color: var(--text-strong); margin-bottom: 2px; }
.curator-meta { font-size: 13px; color: var(--text-muted); }
.btn-curator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-light);
    border: 1px solid var(--accent-line);
    background: var(--accent-wash-soft);
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}
.btn-curator:hover { border-color: var(--accent); background: var(--accent-wash-strong); }

/* ── Loading / error states ── */
.loading-state { text-align: center; padding: 80px 24px; color: var(--text-muted); font-size: 16px; }
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ── Divider ── */
.section-divider {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 4px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--card-border);
}

/* ── Footer ── */
.footer { padding: 32px 0; border-top: 1px solid var(--card-border); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.footer-tagline { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .detail-title-row { flex-direction: column; gap: 8px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 768px) {
    .nav-links a:not(.nav-lang) { display: none; }
}

/* Language switcher and nav button (shared _nav.html). Missing here, so the
   /s/ pages printed every language as a row of plain links. Same rules as blog.css. */
.nav-btn { background: var(--accent) !important; color: var(--on-accent) !important; padding: 6px 16px; border-radius: 6px; }
.lang-switcher { position: relative; }
.lang-switcher-btn {
    font-size: 12px; padding: 4px 10px; border: 1px solid var(--card-border);
    border-radius: 4px; background: none; color: var(--text); cursor: pointer;
    display: flex; align-items: center; gap: 4px; text-decoration: none;
}
.lang-switcher-btn:hover { border-color: var(--accent); color: var(--text-strong); }
.lang-switcher-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--card); border: 1px solid var(--card-border); border-radius: 8px;
    padding: 6px 0; min-width: 140px; z-index: 100; box-shadow: 0 8px 24px var(--shadow);
}
.lang-switcher.open .lang-switcher-menu { display: block; }
.lang-switcher-menu a {
    display: block; padding: 6px 16px; font-size: 12px; color: var(--text-muted);
    text-decoration: none; transition: background-color 0.15s, color 0.15s;
}
.lang-switcher-menu a:hover { background: var(--accent-wash); color: var(--text-strong); }
.lang-switcher-menu a.active { color: var(--accent-light); font-weight: 600; }
