.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.magazine-issue {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    color: #1a202c;
}

.magazine-issue:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

.magazine-issue img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.magazine-issue h3 {
    margin: 0;
    padding: 14px 16px;
    font-size: 1.1rem;
    text-align: center;
}

.magazine-header {
    margin-bottom: 28px;
}

.magazine-header .back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: #3182ce;
    text-decoration: none;
    font-size: .95rem;
}

.magazine-header .back-link:hover {
    text-decoration: underline;
}

.magazine-header h2 {
    margin: 0;
    font-size: 1.6rem;
}

/* ---- list layout (newsletter archival style) ---- */

.magazine-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.magazine-post {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    border-radius: 0;
    transition: none;
}

.magazine-post:last-child {
    border-bottom: none;
}

.magazine-post:hover {
    box-shadow: none;
}

.magazine-post-thumb {
    flex: 0 0 140px;
}

.magazine-post-thumb a {
    display: block;
    text-decoration: none;
}

.magazine-post-thumb img {
    display: block;
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

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

.magazine-post-body h4 {
    margin: 0 0 4px;
    padding: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.magazine-post-body h4 a {
    color: #1a202c;
    text-decoration: none;
}

.magazine-post-body h4 a:hover {
    color: #3182ce;
}

.magazine-post-body .meta {
    padding: 0;
    font-size: .82rem;
    color: #718096;
}

.magazine-post-body .meta a {
    color: #3182ce;
}

.magazine-load-more {
    display: block;
    margin: 0 auto 28px;
}

/* ---- drill levels ---- */

.magazine-level {
    margin-bottom: 20px;
}

.magazine-level-title {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #718096;
    margin: 0 0 8px;
}

.magazine-grid--sm {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.magazine-grid--sm .magazine-issue h3 {
    padding: 10px 12px;
    font-size: .9rem;
}

.magazine-issue--active {
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49,130,206,.25);
}

/* ---- share buttons ---- */

.magazine-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.magazine-header h2 {
    margin: 0;
    font-size: 1.6rem;
    flex: 1;
}

.magazine-share {
    display: flex;
    gap: 6px;
}

.magazine-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity .15s;
}

.magazine-share a:hover { opacity: .8; }

.share-fb { background: #1877f2; }
.share-x  { background: #000; }
.share-li { background: #0a66c2; }
.share-wa { background: #25d366; }

/* ---- count badge ---- */

.magazine-issue h3 small {
    font-size: .75rem;
    color: #718096;
    font-weight: 400;
}

/* ---- breadcrumbs ---- */

.magazine-breadcrumbs {
    font-size: .85rem;
    color: #718096;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.magazine-breadcrumbs a {
    color: #3182ce;
    text-decoration: none;
}

.magazine-breadcrumbs a:hover {
    text-decoration: underline;
}

.magazine-breadcrumbs span {
    color: #1a202c;
}

/* ---- level headings inside posts ---- */

.magazine-posts h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: #1a202c;
}

.magazine-posts h3 + hr {
    margin: 0 0 4px;
    border: none;
    border-top: 1px solid #e2e8f0;
}
