.blog-index,
.blog-post {
    color: #1f2937;
}

.blog-index-hero,
.blog-post-header {
    border: 1px solid #d8e2ec;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.95));
    padding: 22px 24px;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
    margin-bottom: 20px;
}

.blog-kicker {
    margin: 0 0 8px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #4b5563;
}

.blog-index-hero h1,
.blog-post-header h1 {
    margin: 0;
    line-height: 1.15;
    font-size: clamp(1.8rem, 3.2vw, 2.35rem);
    color: #111827;
}

.blog-subtitle,
.blog-post-intro {
    margin: 10px 0 0;
    font-size: 1.05rem;
    color: #4b5563;
    max-width: 70ch;
}

.blog-post-grid {
    display: grid;
    gap: 16px;
}

.blog-card {
    border: 1px solid #d8e2ec;
    border-radius: 12px;
    background: #ffffff;
    padding: 18px 20px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    border-color: #b9ccdd;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.blog-card-meta a {
    color: #2f5a84;
    text-decoration: none;
    font-weight: 600;
}

.blog-card-meta a:hover {
    text-decoration: underline;
}

.blog-card h2 {
    margin: 0 0 8px;
    line-height: 1.3;
    font-size: clamp(1.15rem, 2.15vw, 1.5rem);
}

.blog-card h2 a {
    color: #172554;
    text-decoration: none;
}

.blog-card h2 a:hover {
    text-decoration: underline;
}

.blog-card-intro {
    margin: 0 0 12px;
    color: #374151;
    font-size: 1rem;
}

.blog-card-cta {
    margin: 0;
}

.blog-card-cta a {
    font-weight: 700;
    color: #1d4f80;
    text-decoration: none;
}

.blog-card-cta a:hover {
    text-decoration: underline;
}

.blog-empty {
    margin: 0;
    border: 1px dashed #c9d5e3;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 18px;
    color: #4b5563;
}

.blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.blog-auth-form {
    margin: 0;
    flex: 0 0 auto;
}

.blog-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid #c7d8e8;
    border-radius: 9px;
    background: #ffffff;
    color: #1d4f80;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.blog-auth-button:hover {
    background: #f3f8ff;
    border-color: #a7bfd8;
}

.blog-auth-button:focus-visible {
    outline: 2px solid #2f5a84;
    outline-offset: 2px;
}

.blog-back-link {
    margin: 0;
}

.blog-back-link a {
    color: #2f5a84;
    text-decoration: none;
    font-weight: 600;
}

.blog-back-link a:hover {
    text-decoration: underline;
}

.blog-post-meta {
    margin: 10px 0 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.blog-post-content {
    border: 1px solid #e1e8ef;
    border-radius: 12px;
    background: #fff;
    padding: 22px 24px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.blog-post-content > *:first-child {
    margin-top: 0;
}

.blog-post-content p {
    margin: 0 0 16px;
    font-size: 1.06rem;
    line-height: 1.75;
    color: #1f2937;
}

.blog-post-content img,
.blog-post-content .richtext-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 16px;
}

.blog-post-content img.full-width,
.blog-post-content .richtext-image.full-width {
    width: 100%;
}

.blog-post-content img.left,
.blog-post-content .richtext-image.left {
    float: left;
    margin: 0 20px 16px 0;
}

.blog-post-content img.right,
.blog-post-content .richtext-image.right {
    float: right;
    margin: 0 0 16px 20px;
}

@media (min-width: 769px) {
    .blog-post-content p {
        hyphens: auto;
    }
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post h3.blog-heading {
    margin: 1.1em 0 0.45em;
    line-height: 1.3;
    color: #111827;
    font-weight: 700;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 0 0 16px;
    padding-left: 1.5em;
}

.blog-post-content li {
    margin-bottom: 6px;
}

.blog-post-content li > ul,
.blog-post-content li > ol {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 1.5em;
}

.blog-post-content a {
    color: #1d4f80;
}

.blog-post-content code {
    padding: 0.14em 0.38em;
    border: 1px solid #d7dfeb;
    border-radius: 6px;
    background: #f6f8fb;
    color: #0f172a;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92em;
}

.blog-post-content blockquote {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-left: 4px solid #b9ccdd;
    background: #f8fbff;
    color: #374151;
}

.blog-comments {
    margin-top: 22px;
    border: 1px solid #d8e2ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.blog-comments h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 2.8vw, 1.7rem);
}

.blog-comments .subtle {
    margin: 0;
    color: #475569;
}

.blog-comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 22px;
    display: grid;
    gap: 14px;
}

.blog-comments .comment {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.blog-comments .comment-meta {
    color: #475569;
    margin-bottom: 8px;
}

.blog-comments .comment-author-link {
    color: #1d4f80;
    font-weight: 600;
    text-decoration: none;
}

.blog-comments .comment-author-link:hover {
    text-decoration: underline;
}

.comment-compose {
    margin-top: 14px;
}

.comment-toggle {
    background: none;
    border: none;
    padding: 0;
    color: #1d4f80;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comment-toggle:hover {
    color: #173f66;
}

.comment-toggle:focus-visible {
    outline: 2px solid #2f5a84;
    outline-offset: 3px;
    border-radius: 4px;
}

.comment-form-panel {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #f8fbff;
}

.comment-form-note {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 0.95rem;
}

.comment-account-hint {
    margin: 0 0 12px;
    color: #475569;
    font-size: 0.94rem;
}

.blog-comments .comment-form {
    display: grid;
    gap: 12px;
}

.blog-comments .comment-form .form-group {
    margin: 0;
}

.blog-comments .comment-form label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    color: #1f2937;
}

.blog-comments .comment-form input[type="text"],
.blog-comments .comment-form input[type="email"],
.blog-comments .comment-form input[type="url"],
.blog-comments .comment-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #c8d5e3;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-comments .comment-form textarea {
    min-height: 128px;
    resize: vertical;
}

.blog-comments .comment-form input[type="text"]:focus,
.blog-comments .comment-form input[type="email"]:focus,
.blog-comments .comment-form input[type="url"]:focus,
.blog-comments .comment-form textarea:focus {
    border-color: #2f5a84;
    box-shadow: 0 0 0 3px rgba(47, 90, 132, 0.16);
    outline: none;
}

.blog-comments .comment-form small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}

.blog-comments .comment-form .form-group-checkbox .checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
    font-weight: 500;
}

.blog-comments .comment-form .form-group-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
}

.blog-comments .comment-form .form-error {
    margin-top: 6px;
    color: #b42318;
}

.blog-comments .comment-form .btn.primary {
    justify-self: start;
    border-radius: 8px;
    padding: 10px 18px;
}

.comment-login-hint {
    margin-top: 14px;
}

.comment-login-hint a {
    color: #1d4f80;
    font-weight: 600;
}

@media (max-width: 768px) {
    .blog-index-hero,
    .blog-post-header,
    .blog-post-content,
    .blog-card {
        padding: 16px;
    }

    .blog-subtitle,
    .blog-post-intro {
        font-size: 0.98rem;
    }

    .blog-post-content p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .blog-post-content img.left,
    .blog-post-content img.right,
    .blog-post-content .richtext-image.left,
    .blog-post-content .richtext-image.right {
        float: none;
        margin-inline: 0;
    }

    .comment-form-panel {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .blog-toolbar {
        align-items: flex-start;
    }

    .blog-card-meta {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px 12px;
    }

    .blog-index-hero h1,
    .blog-post-header h1 {
        font-size: 1.6rem;
    }
}
