/*
Theme Name: Anime Manga News (GeneratePress Child)
Theme URI: https://animemanganews.com
Description: Child theme of GeneratePress that applies the Anime Manga News design to the homepage, single posts, and archive pages.
Author: Anime Manga News
Template: generatepress
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
/* ==========================================================================
   Anime Manga News — shared stylesheet
   ========================================================================== */

:root {
  --navy: #0B1F3A;
  --navy-soft: #12294D;
  --blue: #2C5FF6;
  --blue-dark: #1D3FBF;
  --blue-tint: #EAF0FE;
  --paper: #FAFBFD;
  --paper-alt: #F1F4F9;
  --slate: #5B6472;
  --slate-light: #8891A0;
  --line: #E3E7ED;
  --line-dark: #2A3B5C;
  --white: #FFFFFF;
  --red: #E23E3E;
  --gold: #E8A93A;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 4px;
  --max-width: 1240px;
}

html.dark {
  --paper: #0B1220;
  --paper-alt: #111A2E;
  --white: #16213A;
  --navy: #060D1C;
  --line: #223050;
  --slate: #A8B2C4;
  --slate-light: #7A8499;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
html.dark body { color: #ECF1FB; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- utility type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
}
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate-light);
  letter-spacing: 0.02em;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font-weight: 500;
}
html.dark .tag { background: rgba(44,95,246,0.18); color: #8FB0FF; }
.tag--manga { background: #FDEFE0; color: #9A5B12; }
html.dark .tag--manga { background: rgba(232,169,58,0.18); color: var(--gold); }
.tag--movie { background: #F1E8FD; color: #6B3AA8; }
html.dark .tag--movie { background: rgba(139,58,232,0.2); color: #C79CFA; }
.tag--series { background: #E1F5EC; color: #167A4C; }
html.dark .tag--series { background: rgba(29,154,92,0.2); color: #5FD69B; }

/* ---------- topbar ---------- */
.topbar {
  background: var(--navy);
  color: #B9C4DE;
  font-family: var(--font-mono);
  font-size: 12px;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.topbar__socials { display: flex; gap: 14px; }
.topbar__socials a { color: #B9C4DE; opacity: 0.85; }
.topbar__socials a:hover { opacity: 1; color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.01em;
  color: var(--navy);
  white-space: nowrap;
}
html.dark .logo { color: #fff; }
.logo__mark {
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.logo__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
}

.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { list-style: none; }
.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}
html.dark .main-nav a { color: #DCE3F2; }
.main-nav a:hover { color: var(--blue); background: var(--blue-tint); }
html.dark .main-nav a:hover { background: rgba(44,95,246,0.15); }
.main-nav a.active,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--blue); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 14px;
  width: 210px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  width: 100%;
  color: var(--navy);
}
html.dark .search-box input { color: #ECF1FB; }
.search-box svg { flex-shrink: 0; opacity: 0.55; }

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  transition: background 0.15s ease;
}
html.dark .icon-btn { color: #ECF1FB; border-color: var(--line); }
.icon-btn:hover { background: var(--paper-alt); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon { display: none; }
html.dark .icon-btn .sun { display: none; }
html.dark .icon-btn .moon { display: block; }

.mobile-nav-toggle { display: none; }

/* ---------- breaking ticker ---------- */
.ticker {
  background: var(--navy-soft);
  border-bottom: 1px solid var(--line-dark);
  overflow: hidden;
}
.ticker .wrap { display: flex; align-items: stretch; padding: 0; height: 38px; }
.ticker__label {
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
}
.ticker__track {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.ticker__list {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker-scroll 34s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #DCE3F2;
  padding-left: 100%;
}
.ticker__list a:hover { color: var(--blue); }
.ticker__list span { color: var(--slate-light); margin-right: 10px; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__list { animation: none; }
}

/* ---------- section headers ---------- */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.005em;
  margin: 4px 0 0;
  color: var(--navy);
}
html.dark .section-title { color: #fff; }
.section-head a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
}
.section-head a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.lead-card { position: relative; }
.lead-card__img {
  width: 100%;
  aspect-ratio: 16/9.2;
  border-radius: var(--radius);
  background: var(--paper-alt);
  overflow: hidden;
}
.lead-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-card__body { padding-top: 16px; }
.lead-card h1, .lead-card h2 {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  margin: 10px 0 10px;
  color: var(--navy);
}
html.dark .lead-card h1, html.dark .lead-card h2 { color: #fff; }
.lead-card p { color: var(--slate); font-size: 16px; margin: 0 0 12px; max-width: 60ch; }
.lead-card a.card-link:hover h1, .lead-card a.card-link:hover h2 { color: var(--blue); }

.side-stack { display: flex; flex-direction: column; gap: 20px; }

.hero-secondary { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-secondary__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hero-secondary__head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 4px 0 0; color: var(--navy);
}
html.dark .hero-secondary__head h2 { color: #fff; }
.card-grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mini-card { display: flex; gap: 14px; }
.mini-card__img {
  width: 108px; height: 78px; flex-shrink: 0;
  border-radius: var(--radius); background: var(--paper-alt);
  overflow: hidden;
}
.mini-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-card__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.15;
  margin: 6px 0 6px;
  color: var(--navy);
}
html.dark .mini-card__body h3 { color: #fff; }
.mini-card:hover h3 { color: var(--blue); }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- wire feed rail ---------- */
.wire-rail {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.wire-rail .wrap { display: flex; align-items: center; gap: 22px; }
.wire-rail__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding-right: 18px;
}
.wire-rail__scroll {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wire-rail__scroll::-webkit-scrollbar { display: none; }
.wire-item {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
html.dark .wire-item { color: #ECF1FB; }
.wire-item:hover { color: var(--blue); }
.wire-item .meta { font-weight: 400; }

/* ---------- card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card { display: flex; flex-direction: column; }
.card__img {
  width: 100%; aspect-ratio: 4/2.7;
  border-radius: var(--radius); background: var(--paper-alt);
  margin-bottom: 12px;
  overflow: hidden;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.18;
  margin: 8px 0 8px;
  color: var(--navy);
}
html.dark .card h3 { color: #fff; }
.card:hover h3 { color: var(--blue); }
.card p.excerpt { color: var(--slate); font-size: 14px; margin: 0 0 10px; }

/* ---------- ad slot ---------- */
.ad-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper-alt);
  color: var(--slate-light);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ad-slot--leaderboard { height: 90px; margin: 8px 0 0; }
.ad-slot--infeed { grid-column: span 4; height: 120px; }
.ad-slot--rect { height: 250px; }

/* ---------- rankings ---------- */
.rank-list { display: flex; flex-direction: column; }
.rank-item {
  display: grid;
  grid-template-columns: 64px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.rank-item:first-child { padding-top: 4px; }
.rank-item:last-child { border-bottom: none; }
.rank-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 28px;
  color: var(--blue);
  text-align: center;
}
.rank-item__img { width: 96px; height: 64px; border-radius: var(--radius); background: var(--paper-alt); overflow: hidden; }
.rank-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-item h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 4px; color: var(--navy); }
html.dark .rank-item h3 { color: #fff; }
.rank-item:hover h3 { color: var(--blue); }
.rank-delta { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rank-delta--up { color: #1D9A5C; }
.rank-delta--down { color: var(--red); }
.rank-delta--new { color: var(--blue); }

/* ---------- reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.review-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--paper-alt); position: relative; overflow: hidden; }
.review-score {
  position: absolute; top: 12px; right: 12px;
  background: var(--navy); color: #fff;
  font-family: var(--font-mono); font-weight: 600; font-size: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.review-card__body { padding: 16px 18px 20px; }
.stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; margin-bottom: 8px; }
.review-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 8px; color: var(--navy); }
html.dark .review-card h3 { color: #fff; }
.review-card:hover h3 { color: var(--blue); }
.review-card { transition: box-shadow .15s ease, transform .15s ease; }
.review-card:hover { box-shadow: 0 6px 24px rgba(11,31,58,0.08); transform: translateY(-2px); }

/* ---------- newsletter band ---------- */
.newsletter {
  background: var(--navy);
  color: #fff;
  padding: 52px 0;
}
.newsletter .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.newsletter h2 { font-family: var(--font-display); font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.newsletter p { color: #B9C4DE; margin: 0; font-size: 14.5px; }
.newsletter-form { display: flex; gap: 10px; flex-shrink: 0; }
.newsletter-form input {
  width: 260px; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--line-dark);
  background: var(--navy-soft); color: #fff; font-size: 14px; outline: none;
}
.newsletter-form input::placeholder { color: #7C89A8; }
.btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--blue-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #B9C4DE; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #7C89A8; margin: 0 0 16px; }
.footer-col ul li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: 14px; color: #92A0BF; max-width: 34ch; margin: 14px 0 20px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 34px; height: 34px; border: 1px solid var(--line-dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.footer-socials a:hover { background: var(--navy-soft); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-family: var(--font-mono); font-size: 12px; color: #7C89A8; }
.footer-bottom a { margin-left: 18px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- article page ---------- */
.article-hero { padding: 36px 0 0; }
.article-hero .meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.article-hero h1 {
  font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 1.05;
  margin: 0 0 14px; max-width: 22ch; color: var(--navy);
}
html.dark .article-hero h1 { color: #fff; }
.article-hero .dek { font-size: 18px; color: var(--slate); max-width: 60ch; margin: 0 0 24px; }
.byline { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.byline__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-tint); overflow: hidden; }
.byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline__name { font-weight: 600; font-size: 14px; color: var(--navy); }
html.dark .byline__name { color: #fff; }
.article-hero__img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; background: var(--paper-alt); }
.img-caption { font-family: var(--font-mono); font-size: 12px; color: var(--slate-light); margin: 0 0 40px; }

.article-body-grid { display: grid; grid-template-columns: 1fr 300px; gap: 48px; padding-bottom: 56px; padding-top: 24px; }
.article-body { font-size: 17px; line-height: 1.75; color: #29344A; max-width: 68ch; }
html.dark .article-body { color: #D3DAEA; }
.article-body p { margin: 0 0 22px; }
.article-body h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin: 36px 0 14px; color: var(--navy); }
html.dark .article-body h2 { color: #fff; }
.article-body h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 28px 0 12px; color: var(--navy); }
html.dark .article-body h3 { color: #fff; }
.article-body img { border-radius: var(--radius); margin: 8px 0 26px; }
.article-body blockquote {
  border-left: 3px solid var(--blue); margin: 28px 0; padding: 4px 0 4px 20px;
  font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--navy);
}
html.dark .article-body blockquote { color: #fff; }
.article-tags { display: flex; gap: 8px; margin: 30px 0; flex-wrap: wrap; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.share-row .meta { margin-right: 6px; }
.share-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--navy);
  background: transparent;
}
html.dark .share-btn { color: #fff; }
.share-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.article-sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar-block h4 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--slate); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--navy);
}
html.dark .sidebar-block h4 { border-bottom-color: #fff; }
.sidebar-item { display: flex; gap: 12px; margin-bottom: 16px; }
.sidebar-item__img { width: 76px; height: 56px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: var(--paper-alt); }
.sidebar-item h5 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; margin: 0 0 4px; line-height: 1.2; color: var(--navy); }
html.dark .sidebar-item h5 { color: #fff; }
.sidebar-item:hover h5 { color: var(--blue); }

.related-section { padding: 8px 0 56px; }

/* ---------- reading progress bar ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--blue);
  z-index: 999;
  transition: width 0.1s linear;
}

/* ---------- sticky article sidebar ---------- */
.article-body-grid { align-items: start; }
.article-sidebar { position: sticky; top: 100px; }
@media (max-width: 980px) {
  .article-sidebar { position: static; }
}

/* ---------- sidebar: trending list ---------- */
.trending-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.trending-item:last-child { margin-bottom: 0; }
.trending-item__num {
  font-family: var(--font-mono); font-weight: 600; font-size: 20px; color: var(--blue);
  width: 20px; flex-shrink: 0;
}
.trending-item__img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; background: var(--paper-alt); }
.trending-item h5 { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; margin: 0; line-height: 1.25; color: var(--navy); }
html.dark .trending-item h5 { color: #fff; }
.trending-item:hover h5 { color: var(--blue); }

/* ---------- sidebar: author card ---------- */
.author-card { display: flex; gap: 14px; align-items: flex-start; }
.author-card__avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--blue-tint); }
.author-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-card__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--navy); margin: 0 0 4px; }
html.dark .author-card__name { color: #fff; }
.author-card__bio { font-size: 13px; color: var(--slate); line-height: 1.5; margin: 0 0 8px; }
.author-card__link { font-family: var(--font-mono); font-size: 12px; color: var(--blue); font-weight: 500; }
.author-card__link:hover { text-decoration: underline; }

/* ---------- sidebar: mini newsletter ---------- */
.sidebar-newsletter { background: var(--navy); border-radius: var(--radius); padding: 20px; }
.sidebar-newsletter h4 { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }
.sidebar-newsletter p { font-size: 13px; color: #B9C4DE; margin: 0 0 14px; }
.sidebar-newsletter .newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.sidebar-newsletter input {
  width: 100%; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line-dark);
  background: var(--navy-soft); color: #fff; font-size: 13px; outline: none;
}
.sidebar-newsletter input::placeholder { color: #7C89A8; }
.sidebar-newsletter .btn { width: 100%; text-align: center; }

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(11,31,58,0.25); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--blue); }

/* ---------- category page ---------- */
.category-hero {
  background: var(--navy); color: #fff; padding: 46px 0 38px;
}
.category-hero .eyebrow { color: #8FB0FF; }
.category-hero h1 { font-family: var(--font-display); font-size: 44px; font-weight: 800; margin: 8px 0 8px; }
.category-hero p { color: #B9C4DE; font-size: 15.5px; max-width: 62ch; margin: 0; }

.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 32px;
  flex-wrap: wrap; gap: 14px;
}
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-family: var(--font-mono); font-size: 12.5px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--slate);
}
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.sort-select {
  font-family: var(--font-mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 20px;
  padding: 7px 14px; background: var(--white); color: var(--navy);
}

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-bottom: 20px; }
.category-grid .card__img { aspect-ratio: 4/2.6; }

.pagination { display: flex; justify-content: center; gap: 8px; padding: 44px 0 8px; }
.pagination a, .pagination span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; font-family: var(--font-mono); font-size: 13px;
}
.pagination a:hover { background: var(--paper-alt); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .article-body-grid { grid-template-columns: 1fr; }
  .ad-slot--infeed { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .topbar { display: none; }
  .main-nav { display: none; }
  .search-box { display: none; }
  .mobile-nav-toggle {
    display: flex; width: 36px; height: 36px; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--navy);
  }
  html.dark .mobile-nav-toggle { color: #fff; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid--3 { grid-template-columns: 1fr; }
  .review-grid, .category-grid { grid-template-columns: 1fr; }
  .ad-slot--infeed { grid-column: span 1; }
  .lead-card h1, .lead-card h2 { font-size: 30px; }
  .article-hero h1 { font-size: 32px; }
  .newsletter .wrap { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ---------- focus states ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ==========================================================================
   Motion & polish layer
   ========================================================================== */

.lead-card__img img, .mini-card__img img, .card__img img, .rank-item__img img, .review-card__img img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
a:hover .lead-card__img img,
a:hover .mini-card__img img,
a:hover .card__img img,
a:hover .rank-item__img img,
a:hover .review-card__img img { transform: scale(1.07); }

.site-header { transition: box-shadow 0.25s ease, background 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(11, 31, 58, 0.08); }
html.dark .site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }

.main-nav a { position: relative; }
.main-nav a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after,
.main-nav .current-menu-item > a::after { transform: scaleX(1); }

.logo__mark { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo:hover .logo__mark { transform: rotate(-4deg) scale(1.08); }

.btn { transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(44, 95, 246, 0.28); }
.btn:active { transform: translateY(0); }

.icon-btn, .share-btn, .pill { transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.icon-btn:hover { transform: translateY(-1px); }
.share-btn:hover { transform: translateY(-2px) scale(1.05); }

.card, .mini-card, .rank-item { transition: transform 0.3s ease; }
.card:hover { transform: translateY(-4px); }
.rank-item:hover { transform: translateX(4px); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { animation: amn-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.reveal-stagger.is-visible > *:nth-child(1) { animation-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { animation-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { animation-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(4) { animation-delay: 0.20s; }
.reveal-stagger.is-visible > *:nth-child(5) { animation-delay: 0.26s; }
.reveal-stagger.is-visible > *:nth-child(6) { animation-delay: 0.32s; }
@keyframes amn-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes amn-hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .lead-card { animation: amn-hero-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero .side-stack .mini-card { animation: amn-hero-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *, .hero .lead-card, .hero .mini-card {
    animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important;
  }
}
