:root {
  --purple-50: #F0F0F4;
  --purple-100: #CECBF6;
  --purple-400: #7F77DD;
  --purple-600: #534AB7;
  --purple-800: #3C3489;
  --purple-900: #26215C;
  --green-50: #EAF3DE;
  --green-600: #3B6D11;
  --gray-50: #F8F7F4;
  --gray-100: #F1EFE8;
  --gray-200: #D3D1C7;
  --gray-600: #5F5E5A;
  --gray-900: #1C1B18;
  --text-primary: #1C1B18;
  --text-secondary: #5F5E5A;
  --text-muted: #8B8980;
  --border: #E5E3DC;
  --bg: #FAFAF8;
  --serif: 'Noto Serif JP', serif;
  --sans: 'Noto Sans JP', sans-serif;
  --left-nav-w: 220px;
  --header-h: 60px;
  --keyword-h: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
a, a:visited { text-decoration: none; color: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--keyword-h) + 20px); }
body { font-family: var(--sans); background: var(--bg); color: var(--text-primary); -webkit-font-smoothing: antialiased; }

/* ===== LEFT NAV ===== */
.left-nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2.5rem 1.5rem;
  text-decoration: none;
  flex-shrink: 0;
  text-align: center;
}

.left-nav {
  position: fixed; top: 0; left: 0;
  width: var(--left-nav-w); height: 100vh;
  background: #fff; z-index: 300;
  display: flex; flex-direction: column; overflow-y: auto;
}

.nav-section { padding: 1.25rem 0; flex-shrink: 0; }
.nav-section.motive-section { margin-top: auto; padding-bottom: 2rem; }
.nav-item {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); padding: 8px 1.25rem;
  text-decoration: none; transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: #F0F0F0; color: var(--gray-900); }
.nav-item.active { color: var(--text-primary); font-weight: 500; }
.nav-item.motive-link { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.nav-item.nav-external { display: flex; align-items: center; }

/* ===== HEADER ===== */
.site-header {
  position: fixed; top: 0; left: var(--left-nav-w); right: 0;
  height: var(--header-h); background: #F8F7F3; z-index: 200;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 2rem;
}
.header-cta { display: flex; align-items: center; gap: 10px; }
.dark-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); cursor: pointer;
  font-size: 12px; font-family: var(--sans); font-weight: 500;
  transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.dark-toggle:hover { border-color: var(--gray-900); color: var(--gray-900); }
.header-saved {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px; transition: color 0.15s, background 0.15s;
}
.header-saved:hover { color: var(--gray-900); background: #F0F0F0; }
.saved-count {
  display: none; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; font-weight: 600; line-height: 1;
  color: #fff; background: var(--purple-600); border-radius: 8px;
}
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-family: var(--sans); font-weight: 500;
  padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); cursor: pointer;
  transition: border-color 0.15s, color 0.15s; white-space: nowrap;
  text-decoration: none;
}
.cta-btn:hover { border-color: var(--gray-900); color: var(--gray-900); }
a.cta-btn.primary, .cta-btn.primary { background: var(--purple-600); color: #fff; border-color: var(--purple-600); }
a.cta-btn.primary:hover, .cta-btn.primary:hover { background: var(--purple-800); border-color: var(--purple-800); color: #fff; }

/* ===== KEYWORD BAR ===== */
.keyword-bar {
  position: fixed; top: var(--header-h); left: var(--left-nav-w); right: 0;
  height: var(--keyword-h); background: #dfdee9; z-index: 190;
  display: flex; align-items: center; padding: 0 2rem; gap: 12px; overflow-x: auto;
}
.keyword-bar::-webkit-scrollbar { display: none; }
.kw-label { font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.08em; white-space: nowrap; flex-shrink: 0; }
.kw-sep { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; }
.kw-pills { display: flex; gap: 8px; align-items: center; }
.kw-pill {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: #F4F4F6; border: 1px solid #D8D8DE;
  color: var(--text-secondary); text-decoration: none; white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.kw-pill:hover { background: #1C1B18; border-color: #1C1B18; color: #fff; }

/* ===== PAGE BODY ===== */
.page-body { margin-left: var(--left-nav-w); padding-top: calc(var(--header-h) + var(--keyword-h)); min-height: 100vh; }

/* ===== HERO ===== */
.hero-wrapper { width: 100%; }
.hero-kv {
  position: relative; width: 100%;
  height: 480px; overflow: hidden;
}
.hero-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.hero-overlay {
  position: relative; z-index: 2;
  height: 100%; display: flex; align-items: center;
  padding: 0 4rem;
}
.hero-card {
  background: #fff; border-radius: 4px;
  padding: 2.5rem 3rem; max-width: 500px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  color: var(--purple-600); margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--serif); font-size: 32px; font-weight: 500;
  line-height: 1.5; color: var(--text-primary); margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}
.hero-title em { font-style: normal; color: var(--purple-600); }
.hero-desc {
  font-size: 14px; line-height: 1.85; color: var(--text-secondary); margin-bottom: 1.75rem;
}
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  font-size: 13px; font-family: var(--sans); font-weight: 500;
  padding: 11px 22px; border-radius: 8px; background: var(--purple-600);
  color: #fff; border: none; cursor: pointer; transition: background 0.15s, transform 0.1s;
  text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--purple-800); transform: translateY(-1px); }
.btn-secondary {
  font-size: 13px; font-family: var(--sans); font-weight: 500;
  padding: 11px 22px; border-radius: 8px; background: transparent;
  color: var(--text-primary); border: 1px solid var(--border); cursor: pointer;
  transition: border-color 0.15s, background 0.15s; text-decoration: none; display: inline-block;
}
.btn-secondary:hover { border-color: var(--gray-900); background: #F0F0F0; }

/* ===== SECTION COMMON ===== */
.section { padding: 4rem 3rem; max-width: 1060px; margin: 0 auto; }
.section-alt { background: var(--gray-50); }
.section-bg { background: var(--gray-50); display: flex; flex-direction: column; align-items: center; }
.section-bg .section { max-width: none; padding-left: 0; padding-right: 0; width: 100%; }
.section-bg .section-inner { max-width: 1060px; width: 100%; margin-left: auto; margin-right: auto; padding: 0 3rem; box-sizing: border-box; }
.section-header { margin-bottom: 2.5rem; }
.section-eyebrow {
  font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.section-eyebrow::before { content: ''; display: block; width: 16px; height: 1px; background: var(--text-muted); }
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--text-primary); letter-spacing: 0.02em; }
.section-desc { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-top: 8px; }
.section-link { font-size: 13px; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.section-link:hover { color: var(--text-primary); }

/* ===== CONCEPT SECTION ===== */
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.concept-card { background: #fff; padding: 2rem; position: relative; }
.concept-num { font-family: var(--serif); font-size: 48px; font-weight: 500; color: #EBEBEB; line-height: 1; margin-bottom: 1rem; }
.concept-title { font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 0.75rem; line-height: 1.5; }
.concept-desc { font-size: 13px; line-height: 1.85; color: var(--text-secondary); }

/* ===== RANKING SLIDER ===== */
.ranking-section {
  background: transparent;
  padding: 4rem 0;
}
.ranking-header {
  max-width: 1060px; margin: 0 auto; padding: 0 3rem 0;
  box-sizing: border-box;
}
.ranking-slider {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 0 0;
  margin-top: 2.5rem;
  scrollbar-width: none;
}
.ranking-slider::-webkit-scrollbar { display: none; }
.ranking-spacer {
  flex: 0 0 max(calc(3rem - 16px), calc((100% - 1060px) / 2 + 3rem - 16px));
  pointer-events: none;
  scroll-snap-align: start;
}
.ranking-indicator-wrap {
  max-width: 1060px; margin: 0 auto; padding: 20px 3rem 0;
  box-sizing: border-box;
}
.ranking-indicator-track {
  width: 100%; height: 3px; background: var(--border); border-radius: 3px;
  position: relative; overflow: hidden;
}
.ranking-indicator-thumb {
  height: 100%; background: var(--gray-600); border-radius: 3px;
  position: absolute; left: 0; top: 0;
  transition: left 0.1s ease, width 0.1s ease;
}
.ranking-card {
  flex: 0 0 320px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 2rem; display: flex; flex-direction: column;
  text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.ranking-card:hover { border-color: var(--gray-900); transform: translateY(-2px); }
.ranking-num {
  font-family: var(--serif); font-size: 40px; font-weight: 500;
  color: var(--purple-100); line-height: 1; margin-bottom: 1rem;
}
.ranking-card:nth-child(1) .ranking-num { color: var(--purple-600); }
.ranking-card:nth-child(2) .ranking-num { color: var(--purple-400); }
.ranking-card:nth-child(3) .ranking-num { color: var(--purple-100); }
.article-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.article-eyebrow { font-size: 11px; font-weight: 600; color: var(--purple-600); letter-spacing: 0.02em; }
.article-date { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.article-title-lg { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.55; color: var(--text-primary); margin-bottom: 1rem; letter-spacing: 0.01em; }
.article-desc { font-size: 12px; line-height: 1.65; color: var(--text-secondary); flex: 1; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.25rem; }
.tag-pill { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: #EBEBEF; color: #3C3C50; }

/* ===== ARTICLE CARDS ===== */
.articles-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s;
  display: block;
}
.article-card:hover { border-color: var(--gray-900); transform: translateY(-2px); }
.ac-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ac-cat { font-size: 11px; color: var(--purple-600); font-weight: 600; letter-spacing: 0.02em; }
.ac-date { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.ac-title { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.5; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 0.01em; }
.ac-desc { font-size: 12px; line-height: 1.65; color: var(--text-secondary); }
.ac-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.ac-tag { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: #EBEBEF; color: #3C3C50; }

/* ===== CATEGORY SECTION ===== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-card {
  background: var(--purple-600); border: 1px solid var(--purple-600); border-radius: 12px;
  padding: 1.75rem 1.5rem; text-decoration: none; display: block;
  transition: opacity 0.15s, transform 0.15s;
  position: relative;
}
.cat-card:hover { opacity: 0.92; transform: translateY(-2px); }
.cat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.cat-icon svg { stroke: #fff; }
.cat-name { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.cat-desc { font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.7); }
.cat-count { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 10px; }
.cat-card::after {
  content: '→'; position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 16px; color: rgba(255,255,255,0.5);
  transition: color 0.15s, transform 0.15s;
}
.cat-card:hover::after { color: #fff; transform: translateX(3px); }

/* ===== WP SECTION ===== */
.wp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wp-card-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: grid; grid-template-columns: 140px 1fr;
  text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.wp-card-item:hover { border-color: var(--gray-900); transform: translateY(-2px); }
.wp-thumb { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.wp-thumb.purple { background: var(--purple-600); }
.wp-thumb.dark { background: var(--gray-900); }
.wp-body-text { padding: 1.5rem 1.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.wp-label { font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.wp-title { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.55; color: var(--text-primary); margin-bottom: 12px; }
.wp-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--sans); font-weight: 500; padding: 7px 16px; border-radius: 20px; background: var(--purple-600); color: #fff; border: none; cursor: pointer; transition: background 0.15s; width: fit-content; }
.wp-btn:hover { background: var(--purple-800); }

/* ===== BANNER ===== */
.banner-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.banner-item { aspect-ratio: 16/9; border-radius: 10px; border: 1px solid var(--border); display: block; overflow: hidden; transition: transform 0.15s, opacity 0.15s; }
.banner-item:hover { transform: translateY(-2px); opacity: 0.9; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== NEWSLETTER ===== */
.newsletter-section { background: var(--purple-900); padding: 5rem 3rem; }
.newsletter-inner { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
.nl-eyebrow { font-size: 10px; font-weight: 500; color: var(--purple-400); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.nl-eyebrow::before { content: ''; display: block; width: 16px; height: 1px; background: var(--purple-400); }
.nl-title { font-family: var(--serif); font-size: 28px; font-weight: 500; color: #fff; margin-bottom: 10px; letter-spacing: 0.02em; line-height: 1.5; }
.nl-desc { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.7; }
.nl-form { display: flex; gap: 8px; align-items: center; }
.nl-input { font-size: 13px; font-family: var(--sans); padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.12); color: #fff; width: 260px; outline: none; transition: border-color 0.15s, background 0.15s; }
.nl-input::placeholder { color: rgba(255,255,255,0.4); }
.nl-input:focus { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.18); }
.nl-btn { font-size: 13px; font-family: var(--sans); font-weight: 500; padding: 12px 22px; border-radius: 8px; background: #fff; color: var(--purple-900); border: none; cursor: pointer; white-space: nowrap; transition: opacity 0.15s; }
.nl-btn:hover { opacity: 0.88; }

/* ===== FOOTER ===== */
.site-footer { background: var(--gray-900); padding: 3rem 3rem 2rem; }
.footer-inner { max-width: 1060px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 220px auto; gap: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid #2a2a2a; }
.footer-logo { display: block; text-decoration: none; margin-bottom: 1.5rem; }
.footer-logo img { display: block; }
.footer-nav { display: flex; gap: 4rem; justify-content: flex-end; }
.footer-categories {}
.footer-cat-columns { display: grid; grid-template-columns: auto auto; gap: 0 1.25rem; }
.fl-main { font-family: var(--serif); font-size: 16px; font-weight: 500; color: #fff; letter-spacing: 0.04em; }
.fl-sub { font-size: 9px; font-weight: 500; color: var(--purple-400); letter-spacing: 0.14em; text-transform: uppercase; }
.footer-desc { font-size: 12px; line-height: 1.8; color: #666; }
.footer-col-title { font-size: 10px; font-weight: 500; color: #555; letter-spacing: 0.1em; margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: #777; text-decoration: none; transition: color 0.12s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-copy { font-size: 12px; color: #444; }
.footer-policy { display: flex; gap: 20px; }
.footer-policy a { font-size: 12px; color: #444; text-decoration: none; }
.footer-policy a:hover { color: #888; }


/* ===== NEWSLETTER MODAL ===== */
.nl-modal-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0); pointer-events: none;
  transition: background 0.3s ease;
}
.nl-modal-overlay.open {
  background: rgba(0,0,0,0.4); pointer-events: auto;
}
.nl-modal {
  position: fixed; z-index: 710;
  background: var(--bg);
  border-radius: 20px;
  padding: 2.5rem;
  width: 440px; max-width: 90vw;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0; pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  text-align: center;
}
.nl-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; pointer-events: auto;
}
.nl-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); border-radius: 8px;
  transition: background 0.12s;
}
.nl-modal-close:hover { background: var(--gray-100); }
.nl-modal-icon {
  width: 56px; height: 56px; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-50); border-radius: 16px;
}
.nl-modal-title {
  font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: var(--text-primary); line-height: 1.5; margin-bottom: 0.75rem;
}
.nl-modal-desc {
  font-size: 13px; line-height: 1.75; color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.nl-modal-form {
  display: flex; flex-direction: column; gap: 10px;
}
.nl-modal-input {
  width: 100%; padding: 12px 16px; font-size: 14px;
  font-family: var(--sans); border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text-primary);
  outline: none; transition: border-color 0.15s;
}
.nl-modal-input:focus { border-color: var(--purple-400); }
.nl-modal-btn {
  width: 100%; padding: 12px 16px; font-size: 14px; font-weight: 600;
  font-family: var(--sans); background: var(--purple-600); color: #fff;
  border: none; border-radius: 10px; cursor: pointer;
  transition: opacity 0.15s;
}
.nl-modal-btn:hover { opacity: 0.9; }
.nl-modal-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.nl-modal-error {
  font-size: 12px; color: #D94141; text-align: left; margin-top: -4px;
}
.nl-modal-thanks { text-align: center; padding: 1rem 0; }
.nl-modal-thanks-icon { margin: 0 auto 1.25rem; }
.nl-modal-body { text-align: center; }
body.dark-mode .nl-modal { background: #1C1B18; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
body.dark-mode .nl-modal-close:hover { background: #2E2D2A; }
body.dark-mode .nl-modal-input { background: #141412; border-color: #2E2D2A; }
@media (max-width: 900px) {
  .nl-modal { padding: 2rem 1.5rem; border-radius: 16px; }
  .nl-modal-title { font-size: 18px; }
}

/* ===== PAGE HERO BANNER ===== */
.page-hero-banner {
  width: 100%; height: 120px; overflow: hidden;
  position: relative;
}
.page-hero-banner-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  display: block;
}

/* ===== ARTICLES LIST PAGE ===== */
.articles-toolbar {
  display: flex; flex-direction: column; gap: 20px;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.articles-filter-tags {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.articles-filter-tags::-webkit-scrollbar { display: none; }
.filter-tag {
  font-size: 12px; font-family: var(--sans); font-weight: 500;
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
}
.filter-tag:hover { border-color: var(--purple-400); color: var(--purple-600); }
.filter-tag.active {
  background: var(--purple-600); color: #fff;
  border-color: var(--purple-600);
}
.articles-sort {
  display: flex; align-items: center; justify-content: space-between;
}
.sort-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.sort-label select {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--text-primary); background: transparent;
  border: none; cursor: pointer; padding: 2px 0;
  -webkit-appearance: none; appearance: none;
}
.articles-count {
  font-size: 12px; color: var(--text-muted); font-weight: 400;
}

/* Clickable tags inside article cards on list page */
#articlesList .ac-tag {
  cursor: pointer; transition: background 0.12s, color 0.12s;
}
#articlesList .ac-tag:hover {
  background: var(--purple-600); color: #fff;
}

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin-top: 3rem; padding-top: 2rem;
}
.pagination-current, .pagination-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 13px; font-weight: 500; font-family: var(--sans);
  text-decoration: none;
}
.pagination-current {
  background: var(--purple-600); color: #fff;
}
.pagination-link {
  color: var(--text-secondary); transition: background 0.12s;
}
.pagination-link:hover { background: var(--gray-100); }
.pagination-dots {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; font-size: 13px; color: var(--text-muted);
}
.pagination-next {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--text-secondary); text-decoration: none;
  transition: background 0.12s;
}
.pagination-next:hover { background: var(--gray-100); }

/* Empty state */
.articles-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 4rem 0; text-align: center;
}
.articles-empty p {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}
.filter-reset-btn {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--purple-600); background: none; border: none;
  cursor: pointer; padding: 6px 16px; border-radius: 6px;
  border: 1px solid var(--purple-600); transition: all 0.15s;
}
.filter-reset-btn:hover {
  background: var(--purple-600); color: #fff;
}

/* Dark mode for articles page */
body.dark-mode .filter-tag { border-color: #2E2D2A; }
body.dark-mode .filter-tag:hover { border-color: var(--purple-400); }
body.dark-mode .filter-tag.active { background: var(--purple-600); border-color: var(--purple-600); }
body.dark-mode .pagination-link:hover { background: #2E2D2A; }
body.dark-mode .pagination-next:hover { background: #2E2D2A; }
body.dark-mode .sort-label select { color: var(--text-primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero-eyebrow { animation: fadeUp 0.5s 0.05s ease both; }
.hero-title { animation: fadeUp 0.5s 0.1s ease both; }
.hero-desc { animation: fadeUp 0.5s 0.15s ease both; }
.hero-actions { animation: fadeUp 0.5s 0.2s ease both; }
.hero-right { animation: fadeUp 0.5s 0.25s ease both; }

/* ===== MOBILE LOGO / HAMBURGER (hidden on desktop) ===== */
.mobile-logo { display: none; }
.hamburger { display: none; }
.mobile-menu { display: none; }
.category-bar { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  :root { --left-nav-w: 0px; --header-h: 52px; --keyword-h: 74px; }
  .left-nav { display: none; }
  .site-header, .keyword-bar { left: 0; }
  .newsletter-section, .site-footer { margin-left: 0; }
  .page-body { margin-left: 0; }

  /* -- Mobile Header -- */
  .site-header {
    padding: 0 1rem;
    justify-content: space-between;
    z-index: 510;
  }
  .mobile-logo {
    display: flex; align-items: center;
    text-decoration: none; flex-shrink: 0;
  }
  .mobile-logo svg path { fill: var(--text-primary); }
  .header-cta { display: none; }
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; padding: 8px 6px;
    background: none; border: none; cursor: pointer; flex-shrink: 0;
    position: relative; z-index: 510;
  }
  .hamburger span {
    display: block; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: transform 0.25s, opacity 0.2s;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* -- Mobile Menu Overlay (backdrop) -- */
  .mobile-menu-overlay {
    display: block;
    position: fixed; inset: 0; z-index: 499;
    background: rgba(0,0,0,0.35);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

  /* -- Mobile Menu Drawer -- */
  .mobile-menu {
    display: flex; flex-direction: column;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 280px; max-width: 80vw;
    z-index: 520;
    background: var(--bg);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .mobile-menu.open { transform: translateX(0); }

  .mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px 12px 12px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-header .mobile-menu-link {
    width: auto; padding: 7px 14px;
    border: 1px solid var(--border); border-radius: 20px;
    font-size: 12px;
  }
  .mobile-menu-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary);
  }
  .mobile-menu-body { padding: 8px 0; flex: 1; }
  .mobile-menu-group {
    padding: 8px 20px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-link {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-family: var(--sans); font-weight: 500;
    color: var(--text-secondary); padding: 11px 0;
    text-decoration: none; background: none; border: none; cursor: pointer;
    width: 100%; text-align: left;
  }
  .mobile-menu-link svg { flex-shrink: 0; color: var(--text-muted); }
  .mobile-menu-cta { padding: 20px; }
  .mobile-menu-cta-btn {
    display: block; text-align: center; width: 100%;
    padding: 12px 16px; font-size: 14px; font-weight: 600;
    font-family: var(--sans);
    background: var(--purple-600); color: #fff !important;
    border: none; border-radius: 10px; cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
  }
  .mobile-menu-cta-btn:hover { opacity: 0.9; }
  .mobile-menu-dark-toggle {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; margin-top: 12px;
    padding: 8px 14px; border-radius: 20px;
    border: 1px solid var(--border); background: none;
    font-size: 12px; font-family: var(--sans); font-weight: 500;
    color: var(--text-secondary); cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
  }
  .mobile-menu-dark-toggle:hover { border-color: var(--text-primary); color: var(--text-primary); }

  /* -- Category Bar (mobile only) -- */
  .category-bar {
    display: flex; align-items: center; gap: 8px;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    height: 38px; z-index: 190;
    background: var(--bg);
    padding: 0 1rem;
    overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--border);
  }
  .category-bar::-webkit-scrollbar { display: none; }
  .cat-pill {
    font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 20px;
    color: var(--text-secondary); text-decoration: none; white-space: nowrap;
    transition: color 0.12s;
  }
  .cat-pill:hover { color: var(--text-primary); }

  /* -- Keyword Bar mobile -- */
  .keyword-bar {
    top: calc(var(--header-h) + 38px);
    padding: 0 1rem;
    height: 36px;
  }

  /* -- Page body offset -- */
  .page-body { padding-top: calc(var(--header-h) + 38px + 36px); }

  /* -- Hero -- */
  .hero-kv { height: 360px; }
  .hero-overlay { padding: 0 1rem; }
  .hero-card { padding: 1.75rem; }
  .hero-title { font-size: 22px; }

  /* -- Content sections -- */
  .section { padding: 3rem 1rem; }
  .section-bg .section-inner { padding: 0 1rem; }
  .ranking-header { padding: 0 1rem; }
  .ranking-indicator-wrap { padding: 20px 1rem 0; }
  .ranking-spacer { flex: 0 0 calc(1rem - 16px); min-width: 0; }
  .concept-grid { grid-template-columns: 1fr; }
  .ranking-card { flex: 0 0 260px; }
  .articles-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .wp-grid { grid-template-columns: 1fr; }
  .wp-card-item { grid-template-columns: 100px 1fr; }
  .banner-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-section { padding: 3rem 1.5rem; }
  .newsletter-inner { grid-template-columns: 1fr; gap: 2rem; }
  .nl-form { flex-direction: column; align-items: flex-start; }
  .nl-input { width: 100%; }
  .site-footer { padding: 2rem 1.5rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-nav { flex-direction: column; gap: 2rem; justify-content: flex-start; }
}

/* ===== DARK MODE ===== */
body.dark-mode {
  --text-primary: #F0EFE9;
  --text-secondary: #A8A69E;
  --text-muted: #6A6860;
  --border: #2E2D2A;
  --bg: #141412;
  background: var(--bg);
  color: var(--text-primary);
}
body.dark-mode .site-header,
body.dark-mode .left-nav { background: #1C1B18; }
body.dark-mode .mobile-menu { background: #302F2A; }
body.dark-mode .mobile-menu-group { border-bottom-color: #3A3935; }
body.dark-mode .mobile-menu-header { border-bottom-color: #3A3935; }
body.dark-mode .mobile-menu-dark-toggle { border-color: #3A3935; }
body.dark-mode .keyword-bar { background: #252420; }
body.dark-mode .left-nav-logo svg path { fill: #AFA9EC; }
body.dark-mode .nav-item:hover { background: #252420; }
body.dark-mode .nav-item.active { background: #2a2a2a; color: #F0EFE9; border-right-color: #F0EFE9; }
body.dark-mode .hero-card { background: #1C1B18; color: var(--text-primary); }
body.dark-mode .concept-card,
body.dark-mode .article-card,
body.dark-mode .wp-card-item { background: #1C1B18; border-color: #2E2D2A; }
body.dark-mode .cat-card { background: var(--purple-800); border-color: var(--purple-800); }
body.dark-mode .cat-card:hover { border-color: var(--purple-600); }
body.dark-mode .ranking-section { background: transparent; }
body.dark-mode .ranking-card { background: #1C1B18; border-color: #2E2D2A; }
body.dark-mode .ranking-indicator-track { background: #2E2D2A; }
body.dark-mode .ranking-indicator-thumb { background: #666; }
body.dark-mode .section-bg { background: #1C1B18; }
body.dark-mode .section-alt { background: #1C1B18; }
body.dark-mode .newsletter-section { background: #1A1836; }
body.dark-mode .nl-input { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); color: #fff; }
body.dark-mode .site-footer { background: #0C0C0A; }
body.dark-mode .footer-bottom { border-color: #1E1E1C; }
body.dark-mode .concept-num { color: #333; }
body.dark-mode .kw-sep { background: #2E2D2A; }
body.dark-mode .hero-stat { border-color: #2E2D2A; }
body.dark-mode .banner-item { border-color: #2E2D2A; }
body.dark-mode .kw-pill { background: #2E2D2A; border-color: #3A3935; color: var(--text-secondary); }
body.dark-mode .kw-pill:hover { background: #F0EFE9; border-color: #F0EFE9; color: #1C1B18; }
body.dark-mode .dark-toggle,
body.dark-mode .cta-btn { background: #252420; border-color: #3A3935; color: var(--text-secondary); }
body.dark-mode .dark-toggle:hover,
body.dark-mode .cta-btn:hover { border-color: #F0EFE9; color: #F0EFE9; }
body.dark-mode .cta-btn.primary { background: var(--purple-600); color: #fff; border-color: var(--purple-600); }
body.dark-mode .header-saved:hover { background: #252420; color: #F0EFE9; }
body.dark-mode .ac-tag { background: #2E2D2A; color: #A8A69E; }
body.dark-mode .tag-pill { background: #2E2D2A; color: #A8A69E; }
body.dark-mode .cat-icon { background: #252420; border-color: #3A3935; }
body.dark-mode .cat-icon svg { stroke: var(--text-secondary); }
body.dark-mode .btn-secondary { border-color: #3A3935; color: var(--text-primary); }
body.dark-mode .btn-secondary:hover { border-color: #F0EFE9; background: #252420; }
body.dark-mode .ranking-card:hover { border-color: #555; }
body.dark-mode .article-card:hover { border-color: #555; }
body.dark-mode .wp-card-item:hover { border-color: #555; }
body.dark-mode .wp-thumb.dark { background: #0C0C0A; }

/* ===== SAVED ARTICLES PAGE ===== */
.saved-section { min-height: 60vh; }

/* Loading */
.saved-loading { text-align: center; padding: 4rem 0; color: var(--text-muted); font-size: 14px; }
.saved-loading-spinner {
  width: 28px; height: 28px; border: 2px solid var(--border); border-top-color: var(--purple-600);
  border-radius: 50%; margin: 0 auto 12px; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.saved-empty { text-align: center; max-width: 520px; margin: 0 auto; padding: 2rem 0 4rem; }
.saved-empty-icon { margin-bottom: 1.5rem; opacity: 0.5; }
.saved-empty-title { font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 12px; color: var(--text-primary); }
.saved-empty-desc { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 2.5rem; }
.saved-empty-tips {
  display: flex; flex-direction: column; gap: 16px;
  text-align: left; margin-bottom: 2.5rem;
  background: var(--gray-50); border-radius: 12px; padding: 1.5rem;
}
body.dark-mode .saved-empty-tips { background: #1C1B18; }
.saved-tip { display: flex; gap: 12px; align-items: flex-start; }
.saved-tip-icon { flex-shrink: 0; margin-top: 2px; }
.saved-tip-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.saved-tip-desc { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.saved-empty-cta {
  display: inline-block; font-size: 14px; font-weight: 500; font-family: var(--sans);
  padding: 10px 24px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--text-primary); text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.saved-empty-cta:hover { border-color: var(--gray-900); background: var(--gray-50); }

/* Controls bar */
.saved-controls { margin-bottom: 2rem; }
.saved-filter-tags {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.saved-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.saved-clear-btn {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-family: var(--sans); color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.saved-clear-btn:hover { color: #c0392b; background: rgba(192,57,43,0.06); }

/* Article card with remove button */
.saved-article-card { position: relative; }
.saved-card-link { display: block; text-decoration: none; color: inherit; }
.saved-remove-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; color: var(--text-muted); opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.saved-article-card:hover .saved-remove-btn { opacity: 1; }
.saved-remove-btn:hover { color: #c0392b; border-color: #c0392b; }

/* No results for filter */
.saved-no-filter { text-align: center; padding: 3rem 0; color: var(--text-muted); font-size: 14px; }

/* Mobile */
@media (max-width: 900px) {
  .saved-remove-btn { opacity: 1; }
  .saved-filter-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .saved-filter-tags::-webkit-scrollbar { display: none; }
}
