:root {
    --bg: #f7f7f4;
    --text: #1f2933;
    --muted: #667085;
    --card: #ffffff;
    --line: #e5e7eb;
    --accent: #1d4ed8;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.logo { font-weight: 800; color: var(--text); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .75rem; }
.container { width: min(1100px, 100%); margin: 0 auto; padding: 1rem; }
.site-footer { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.magazine-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.magazine-grid .card:first-child { grid-column: span 4; }
.magazine-grid .card { grid-column: span 2; }
.social-feed { max-width: 640px; margin: 0 auto; display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 25px rgba(15, 23, 42, .05); }
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #eee; }
.social-feed .card img { aspect-ratio: 1/1; }
.card-body { padding: 1rem; }
.card h2 { margin: 0 0 .5rem; line-height: 1.2; }
.meta { color: var(--muted); font-size: .9rem; }
.article-full { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(1rem, 4vw, 3rem); }
.article-full h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; }
.lead { font-size: 1.2rem; color: var(--muted); }
.hero { width: 100%; max-height: 520px; object-fit: cover; border-radius: 18px; margin: 1rem 0; }
.content { font-size: 1.08rem; }
.form-card { display: grid; gap: .75rem; max-width: 430px; background: #fff; padding: 1rem; border-radius: 18px; border: 1px solid var(--line); }
.form-card.wide { max-width: 900px; }
input, textarea, select, button { font: inherit; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; }
button, .button { display: inline-block; background: var(--accent); color: #fff; border: 0; padding: .7rem 1rem; border-radius: 10px; cursor: pointer; }
.error { color: #b42318; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; }
.admin-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.stats strong { display: block; font-size: 2rem; }
.stats span { color: var(--muted); }
.search-form { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.search-form label { width: 100%; }
@media (max-width: 760px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .magazine-grid { grid-template-columns: 1fr; }
    .magazine-grid .card, .magazine-grid .card:first-child { grid-column: auto; }
}
