/* ─── TOKENS ─────────────────────────────────────────────────────────── */
:root {
    --c-bg: #FAFAF9;
    --c-surface: #FFFFFF;
    --c-border: #E8E6E1;
    --c-border-light: #F0EEE9;
    --c-text-primary: #18181B;
    --c-text-secondary: #6B7280;
    --c-text-muted: #9CA3AF;
    --c-accent: #1A6B4A;
    --c-accent-light: #E8F5EF;
    --c-accent-hover: #155E3E;
    --c-amber: #D97706;
    --c-amber-light: #FEF3C7;
    --c-red: #DC2626;
    --c-red-light: #FEF2F2;
    --c-blue: #2563EB;
    --c-blue-light: #EFF6FF;
    --c-purple: #7C3AED;
    --c-purple-light: #F5F3FF;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-2xl: 32px;
    --r-full: 100px;

    --sh-xs: 0 1px 2px rgba(0, 0, 0, .05);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .04);
    --sh-xl: 0 24px 48px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .06);

    --font-display: 'Sora', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-h: 56px;
}

[data-theme="dark"] {
    --c-bg: #111110;
    --c-surface: #1C1C1A;
    --c-border: #2A2A28;
    --c-border-light: #232321;
    --c-text-primary: #F4F3F0;
    --c-text-secondary: #A09F99;
    --c-text-muted: #6B6A64;
    --c-accent: #22C278;
    --c-accent-light: #0D2B1F;
    --c-accent-hover: #1EAA69;
    --c-amber: #F59E0B;
    --c-amber-light: #1F1500;
    --c-red: #F87171;
    --c-red-light: #1F0A0A;
    --c-blue: #60A5FA;
    --c-blue-light: #0E1F3D;
    --c-purple: #A78BFA;
    --c-purple-light: #1A1040;
    --sh-xs: 0 1px 2px rgba(0, 0, 0, .2);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .4);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --sh-xl: 0 24px 48px rgba(0, 0, 0, .6);
}

/* ─── RESET ─────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--c-bg);
    color: var(--c-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .2s, color .2s;
    overflow-x: hidden;
    min-width: 320px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

textarea {
    font-family: inherit;
}

/* ─── NAV ─────────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--nav-h);
    background: rgba(17, 17, 16, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    transition: background .2s;
}

[data-theme="light"] .nav {
    background: rgba(250, 250, 249, .92);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -.02em;
    flex-shrink: 0;
}

.nav-logo-mark {
    width: 30px;
    height: 30px;
    background: var(--c-accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-logo-mark svg {
    width: 16px;
    height: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-secondary);
    padding: 5px 10px;
    border-radius: var(--r-sm);
    transition: color .12s, background .12s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--c-text-primary);
    background: var(--c-border-light);
}

.nav-link.active {
    color: var(--c-accent);
    background: var(--c-accent-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-theme-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border);
    transition: all .12s;
    flex-shrink: 0;
}

.nav-theme-btn:hover {
    color: var(--c-text-primary);
    border-color: var(--c-text-muted);
}

.nav-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    align-items: center;
    justify-content: center;
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--r-md);
    padding: 8px 16px;
    transition: all .15s ease;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--c-accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.btn-primary:hover {
    background: var(--c-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--sh-md);
}

.btn-secondary {
    background: var(--c-surface);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
    box-shadow: var(--sh-xs);
}

.btn-secondary:hover {
    border-color: var(--c-text-muted);
}

.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 16px 20px 20px;
    z-index: 199;
    box-shadow: var(--sh-lg);
}

.nav-mobile.open {
    display: block;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.nav-mobile-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-secondary);
    padding: 10px 12px;
    border-radius: var(--r-sm);
    display: block;
    transition: all .1s;
}

.nav-mobile-link:hover {
    background: var(--c-bg);
    color: var(--c-text-primary);
}

.nav-mobile-link.active {
    background: var(--c-accent-light);
    color: var(--c-accent);
}

.nav-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-mobile-actions .btn {
    width: 100%;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: var(--r-lg);
}

/* ─── PAGE STRUCTURE ─────────────────────────────────────────────── */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: var(--nav-h);
}

.page-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── BREADCRUMB ─────────────────────────────────────────────────── */
.breadcrumb-bar {
    padding: 16px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--c-text-muted);
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: var(--c-text-muted);
    transition: color .12s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-link:hover {
    color: var(--c-accent);
}

.breadcrumb-sep {
    color: var(--c-border);
    font-size: 14px;
}

.breadcrumb-current {
    color: var(--c-text-secondary);
    font-weight: 500;
}

/* ─── LAYOUT GRID ────────────────────────────────────────────────── */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 288px;
    gap: 28px;
    padding: 20px 0 72px;
    align-items: start;
}

.post-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ─── HERO DISCUSSION CARD ───────────────────────────────────────── */
.post-hero-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: box-shadow .2s;
}

.post-hero-card:hover {
    box-shadow: var(--sh-md);
}

/* Community accent bar */
.post-accent-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--c-accent), transparent);
}

.post-hero-body {
    padding: 28px 28px 0;
}

/* Author row */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.post-avatar-link {
    flex-shrink: 0;
    display: block;
}

.post-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-display);
    border: 2px solid var(--c-border);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    flex-shrink: 0;
}

.post-avatar-lg:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px rgba(34, 194, 120, .2);
}

.post-avatar-lg img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}

.post-author-details {
    flex: 1;
    min-width: 0;
}

.post-author-name-link {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -.01em;
    transition: color .12s;
    display: inline-block;
}

.post-author-name-link:hover {
    color: var(--c-accent);
}

.post-author-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.post-community-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    background: var(--c-accent-light);
    color: var(--c-accent);
    padding: 3px 10px;
    border-radius: var(--r-full);
    transition: background .12s, color .12s;
}

.post-community-pill:hover {
    background: var(--c-accent);
    color: #fff;
}

.post-time-label {
    font-size: 12px;
    color: var(--c-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--c-amber-light);
    color: var(--c-amber);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
    border: 1px solid rgba(245, 158, 11, .2);
}

/* Post content */
.post-hero-content {
    font-size: 16px;
    color: var(--c-text-primary);
    line-height: 1.78;
    margin-bottom: 22px;
    word-break: break-word;
}

/* Post image */
.post-hero-image-wrap {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
    margin-bottom: 22px;
    background: var(--c-bg);
}

.post-hero-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.post-hero-image:hover {
    transform: scale(1.01);
}

/* Stats strip */
.post-stats-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--c-border-light);
    font-size: 12px;
    color: var(--c-text-muted);
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* Action bar */
.post-action-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 28px 20px;
    border-top: 1px solid var(--c-border-light);
    flex-wrap: wrap;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted);
    padding: 8px 14px;
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}

.post-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    background: currentColor;
    opacity: 0;
    transition: opacity .12s;
}

.post-action-btn:hover::after {
    opacity: .06;
}

.post-action-btn:hover {
    color: var(--c-text-secondary);
    background: var(--c-bg);
}

.post-action-btn.active-like {
    color: var(--c-accent);
    background: var(--c-accent-light);
}

.post-action-btn.active-love {
    color: var(--c-red);
    background: var(--c-red-light);
}

.post-action-btn .action-count {
    font-size: 12px;
    font-weight: 700;
    min-width: 14px;
}

.post-share-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-accent);
    padding: 8px 16px;
    border-radius: var(--r-lg);
    background: var(--c-accent-light);
    border: 1px solid rgba(34, 194, 120, .2);
    cursor: pointer;
    transition: all .15s;
}

.post-share-btn:hover {
    background: var(--c-accent);
    color: #fff;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-secondary);
    padding: 8px 14px;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    transition: all .15s;
    box-shadow: var(--sh-xs);
}

.back-link:hover {
    color: var(--c-text-primary);
    border-color: var(--c-text-muted);
}

/* ─── COMMENTS SECTION ───────────────────────────────────────────── */
.comments-section {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-xs);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 18px;
    border-bottom: 1px solid var(--c-border-light);
}

.comments-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -.02em;
}

.comments-count-pill {
    font-size: 11px;
    font-weight: 700;
    background: var(--c-accent-light);
    color: var(--c-accent);
    padding: 3px 10px;
    border-radius: var(--r-full);
}

/* ─── COMMENT COMPOSER ───────────────────────────────────────────── */
.comment-composer {
    padding: 18px 24px 20px;
    border-bottom: 1px solid var(--c-border-light);
}

.composer-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.composer-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-display);
    background: var(--c-accent-light);
    color: var(--c-accent);
    overflow: hidden;
    margin-top: 2px;
}

.composer-av img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.composer-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form {
    display: contents;
}

.comment-textarea {
    width: 100%;
    min-height: 88px;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 13px 16px;
    font-size: 14px;
    color: var(--c-text-primary);
    font-family: var(--font-body);
    resize: vertical;
    outline: none;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s, min-height .2s;
}

.comment-textarea:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(34, 194, 120, .1);
    min-height: 110px;
}

.comment-textarea::placeholder {
    color: var(--c-text-muted);
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-post-comment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--c-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: var(--r-lg);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all .15s;
    box-shadow: 0 1px 4px rgba(34, 194, 120, .3);
}

.btn-post-comment:hover {
    background: var(--c-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--sh-md);
}

.btn-post-comment:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ─── COMMENT CARDS ──────────────────────────────────────────────── */
.comments-list {
    display: flex;
    flex-direction: column;
}

.comment-card {
    padding: 18px 24px;
    border-bottom: 1px solid var(--c-border-light);
    transition: background .15s;
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-card:hover {
    background: rgba(34, 194, 120, .02);
}

.comment-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar-link {
    flex-shrink: 0;
    display: block;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-display);
    border: 1.5px solid var(--c-border);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform .15s, box-shadow .15s;
}

.comment-avatar-link:hover .comment-avatar {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px rgba(34, 194, 120, .2);
}

.comment-avatar img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.comment-author-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-primary);
    transition: color .12s;
}

.comment-author-link:hover {
    color: var(--c-accent);
}

.comment-time {
    font-size: 11px;
    color: var(--c-text-muted);
}

.comment-text {
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.7;
    word-break: break-word;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-like-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-muted);
    padding: 4px 10px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all .12s;
    font-family: var(--font-body);
}

.comment-like-btn:hover {
    background: var(--c-bg);
    color: var(--c-text-secondary);
}

.comment-like-btn.liked {
    color: var(--c-accent);
    background: var(--c-accent-light);
}

.comment-like-count {
    font-weight: 700;
    min-width: 12px;
}

/* ─── EMPTY COMMENTS ─────────────────────────────────────────────── */
.comments-empty {
    padding: 52px 28px;
    text-align: center;
}

.comments-empty-icon {
    font-size: 44px;
    margin-bottom: 14px;
    line-height: 1;
}

.comments-empty-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -.02em;
    margin-bottom: 8px;
}

.comments-empty-sub {
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 20px;
}

.btn-be-first {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--c-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: var(--r-lg);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(34, 194, 120, .3);
}

.btn-be-first:hover {
    background: var(--c-accent-hover);
    transform: translateY(-1px);
}

/* ─── SIDEBAR WIDGETS ────────────────────────────────────────────── */
.widget {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.widget-head {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--c-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-primary);
}

.widget-link {
    font-size: 11px;
    color: var(--c-accent);
    font-weight: 600;
    transition: opacity .12s;
}

.widget-link:hover {
    opacity: .75;
}

.widget-body {
    padding: 14px 18px;
}

.widget-about-text {
    font-size: 13px;
    color: var(--c-text-secondary);
    line-height: 1.65;
    margin-bottom: 14px;
}

.widget-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding: 5px 0;
}

.widget-stat-label {
    color: var(--c-text-muted);
}

.widget-stat-val {
    font-weight: 700;
    color: var(--c-text-primary);
}

.other-list {
    display: flex;
    flex-direction: column;
}

.other-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--c-border-light);
    text-decoration: none;
    transition: all .1s;
    cursor: pointer;
}

.other-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.other-item:first-child {
    padding-top: 0;
}

.other-item:hover .other-name {
    color: var(--c-accent);
}

.other-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
}

.other-info {
    flex: 1;
    min-width: 0;
}

.other-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-primary);
    transition: color .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-count {
    font-size: 10px;
    color: var(--c-text-muted);
}

/* ─── FLASH ──────────────────────────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.flash.error {
    background: var(--c-red-light);
    color: var(--c-red);
    border: 1px solid rgba(220, 38, 38, .2);
}

.flash.success {
    background: var(--c-accent-light);
    color: var(--c-accent);
    border: 1px solid rgba(34, 194, 120, .2);
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: 44px 0 28px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand-desc {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin-top: 10px;
    max-width: 240px;
}

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-link {
    font-size: 13px;
    color: var(--c-text-secondary);
    transition: color .1s;
}

.footer-link:hover {
    color: var(--c-text-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--c-border-light);
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copy {
    font-size: 12px;
    color: var(--c-text-muted);
}

.footer-legal {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-legal a {
    font-size: 12px;
    color: var(--c-text-muted);
}

.footer-legal a:hover {
    color: var(--c-text-secondary);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand-desc {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    :root {
        --nav-h: 52px;
    }

    .nav-links,
    .nav-desktop-cta {
        display: none;
    }

    .nav-menu-btn {
        display: flex;
    }

    .page-wrap {
        padding: 0 16px;
    }

    .post-hero-body {
        padding: 20px 18px 0;
    }

    .post-action-bar {
        padding: 10px 18px 16px;
        gap: 2px;
    }

    .post-action-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .post-share-btn {
        padding: 7px 12px;
    }

    .comments-header {
        padding: 16px 18px 14px;
    }

    .comment-composer {
        padding: 14px 18px 16px;
    }

    .comment-card {
        padding: 14px 18px;
    }

    .comments-empty {
        padding: 40px 20px;
    }

    .post-sidebar {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ─── UTILITY ─────────────────────────────────────────────────────── */
.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(--c-accent);
    outline-offset: 2px;
}