/* Search-engine readable parts of the site (server/seo.py, 2026-10-28).
   App pages: the login heading (now h2, so it is not the page's h1), the title summary's
   breadcrumb and related titles, and the site footer. /browse and /genre pages: the
   whole standalone archive page. */

/* Same look the login heading had as the global h1 (style.css "h1" + #screen-login rule). */
#screen-login .login-head h2#login-title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.5;
}

.poster-link { color: inherit; text-decoration: none; }
.poster-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.seo-crumbs { font-size: 13px; color: var(--text-dim, #a9a9b8); margin: 0 0 10px; }
.seo-crumbs a { color: var(--accent, #f5b544); text-decoration: none; }
.seo-crumbs a:hover { text-decoration: underline; }

.seo-grid {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 16px 12px;
}
.seo-card { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.seo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #1b1b26;
}
.seo-card-name { font-weight: 700; font-size: 14px; line-height: 1.6; }
.seo-card-en { font-size: 12px; color: var(--text-dim, #a9a9b8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-card-facts { font-size: 12px; color: var(--text-dim, #a9a9b8); }
.seo-card:hover .seo-card-name, .seo-card:focus-visible .seo-card-name { color: var(--accent, #f5b544); }
.seo-title .seo-grid { clear: both; }
.seo-title h2 { font-size: 18px; margin: 18px 0 4px; }

.seo-footer {
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 24px 16px calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim, #a9a9b8);
  font-size: 13px;
  line-height: 1.9;
}
.seo-footer h2 { font-size: 14px; margin: 0 0 6px; color: var(--text, #f1f1f6); }
.seo-footer nav { margin-bottom: 16px; }
.seo-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.seo-footer a { color: inherit; text-decoration: none; }
.seo-footer a:hover { color: var(--accent, #f5b544); text-decoration: underline; }

/* ---------- standalone archive pages (/browse/<shelf>, /genre/<genre>) ---------- */
body.seo-page {
  margin: 0;
  background: #0b0b12;
  color: #f1f1f6;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.7;
  --text: #f1f1f6;
  --text-dim: #a9a9b8;
  --accent: #f5b544;
}
.seo-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(11, 11, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.seo-brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 800; font-size: 17px; }
.seo-brand img { border-radius: 10px; }
.seo-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f5b544;
  color: #1a1206;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.seo-main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.seo-main h1 { font-size: 24px; margin: 4px 0; }
.seo-summary { margin: 0 0 8px; color: var(--text-dim); font-size: 14px; }
.seo-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 24px 0; }
.seo-pager a, .seo-pager span[aria-current] {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
}
.seo-pager a:hover { background: rgba(245, 181, 68, 0.18); }
.seo-pager span[aria-current] { background: #f5b544; color: #1a1206; font-weight: 800; }
body.seo-page .seo-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (max-width: 560px) {
  .seo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .seo-card-name { font-size: 12.5px; }
  .seo-main h1 { font-size: 20px; }
  .seo-cta { padding: 7px 10px; font-size: 12px; }
}
