.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #111;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-cta {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.blog-index { padding: 45px 0 70px; }
.index-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.index-hero h1 { margin: 0 0 7px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.045em; }
.index-hero p { margin: 0; color: var(--muted); max-width: 680px; }
.search-form { display: flex; gap: 8px; min-width: min(100%, 330px); }
.search-form input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; background: #fff; }
.search-form button { border-radius: 11px; padding: 10px 14px; background: var(--text); color: #fff; font-weight: 700; border: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter { padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-size: .78rem; font-weight: 700; }
.filter.active, .filter:hover { border-color: #FCD34D; background: #FFF7E6; color: #92400E; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); }
.post-image, .post-placeholder { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #F3F4F6; }
.post-body { padding: 18px; }
.post-cat { color: var(--accent-dark); text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 800; }
.post-title { margin: 7px 0 8px; font-size: 1.2rem; line-height: 1.25; }
.post-excerpt { margin: 0; color: var(--muted); font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin-top: 14px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: .74rem; font-weight: 600; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 18px 0 0; margin: 0; color: var(--muted); font-size: .82rem; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--muted-2); }

.comments { padding: 10px 0 70px; }
.comment { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.comment-form, .auth-card form, .profile-form { display: grid; gap: 8px; }
.comment-form textarea, .auth-card input, .profile-form input, .profile-form textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit;
}
.comment-form button, .auth-card button, .profile-form button, .btn-primary-sm {
  background: #111827; color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer;
}
.form-error, .db-note { color: #991B1B; background: #FEF2F2; border: 1px solid #FECACA; padding: 10px 12px; border-radius: 10px; }
.muted { color: var(--muted); }
.aperture { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-gradient); display: inline-block; }

.auth-page { background: #F8FAFC; }
.auth-card {
  width: min(440px, calc(100% - 40px));
  margin: 48px auto 80px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.auth-switch { margin-top: 16px; color: var(--muted); }

.dash-wrap { width: min(1180px, calc(100% - 40px)); margin: 24px auto 80px; display: grid; grid-template-columns: 230px 1fr; gap: 24px; }
.dash-side { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; height: fit-content; }
.dash-side nav { display: grid; gap: 8px; margin-top: 16px; }
.dash-side a { color: var(--muted); font-weight: 600; }
.dash-user { margin: 0; font-weight: 800; }
.dash-handle { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.dash-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.dash-head h1 { margin: 0; }
.dash-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dash-filters a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: .82rem; font-weight: 700; }
.dash-filters a.active { background: #111827; color: #fff; border-color: #111827; }
.post-row { display: flex; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.post-row h2 { margin: 0 0 6px; font-size: 1.05rem; }
.row-actions { display: flex; gap: 12px; align-items: center; }
.link-danger { background: none; border: 0; color: #b91c1c; font: inherit; font-weight: 700; cursor: pointer; }
.status-pill { text-transform: capitalize; font-size: .72rem; font-weight: 800; margin-right: 8px; }
.status-pill.published { color: #047857; }
.status-pill.draft { color: #b45309; }
.avatar-preview { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.notice { background: #ECFDF5; color: #065F46; padding: 10px 12px; border-radius: 10px; }
.article-content img { max-width: 100%; border-radius: 10px; }

@media (max-width: 900px) {
  .index-hero { flex-direction: column; align-items: stretch; }
  .post-grid, .dash-wrap { grid-template-columns: 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .post-row { flex-direction: column; }
}
