/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-accent: #7c3aed;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-impact-5: #dc2626;
  --color-impact-4: #ea580c;
  --color-impact-3: #d97706;
  --color-impact-2: #65a30d;
  --color-impact-1: #6b7280;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  min-height: calc(100vh - 64px - 400px);
  padding-bottom: 60px;
}

/* ===== Header ===== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }
.logo-ai { color: var(--color-primary); }
.logo-x { color: var(--color-text-muted); margin: 0 2px; }
.logo-backoffice { color: var(--color-text); }
.logo-daily {
  background: var(--color-primary);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.site-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.site-nav a {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  text-decoration: none;
}

.btn-subscribe {
  background: var(--color-primary);
  color: white !important;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
  text-decoration: none !important;
}
.btn-subscribe:hover { background: var(--color-primary-dark); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 100%);
  color: white;
  padding: 80px 0;
  margin-bottom: 60px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-title span { color: #93c5fd; }
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  opacity: .9;
  max-width: 600px;
  margin-bottom: 32px;
}
.btn-hero {
  display: inline-block;
  background: white;
  color: var(--color-primary) !important;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none !important;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ===== Sections ===== */
.section-latest, .section-weekly {
  margin-bottom: 60px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}
.section-header h2 {
  font-size: 22px;
  font-weight: 700;
}
.see-all {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 500;
}

/* ===== Article Grid ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.article-grid--2col {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

/* ===== Article Card ===== */
.article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card-meta time {
  font-size: 13px;
  color: var(--color-text-muted);
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-primary); text-decoration: none; }
.card-summary {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(1.6em * 3);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== Tags ===== */
.tag {
  background: #eff6ff;
  color: var(--color-primary);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.tag:hover { background: var(--color-primary); color: white; text-decoration: none; }

/* ===== Impact Badge ===== */
.impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.impact-5 { background: #fee2e2; color: var(--color-impact-5); }
.impact-4 { background: #ffedd5; color: var(--color-impact-4); }
.impact-3 { background: #fef3c7; color: var(--color-impact-3); }
.impact-2 { background: #ecfccb; color: var(--color-impact-2); }
.impact-1 { background: #f3f4f6; color: var(--color-impact-1); }

/* ===== Single Article ===== */
.single-article {
  max-width: 760px;
  margin: 60px auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
}
.article-header { margin-bottom: 40px; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.article-meta time { font-size: 14px; color: var(--color-text-muted); }
.article-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}
.article-summary {
  font-size: 17px;
  color: var(--color-text-muted);
  line-height: 1.7;
  padding: 16px;
  background: var(--color-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body { line-height: 1.9; }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--color-border); }
.article-body h3 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 8px; }

.article-sources { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.article-sources h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--color-text-muted); }
.article-sources a { font-size: 14px; word-break: break-all; }

/* ===== Article Nav ===== */
.article-nav {
  max-width: 760px;
  margin: 24px auto 60px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.article-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color .15s, color .15s;
}
.article-nav a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }

/* ===== Page Header ===== */
.page-header {
  padding: 48px 0 32px;
}
.page-header h1 { font-size: 32px; font-weight: 800; }
.page-description { color: var(--color-text-muted); margin-top: 8px; }

/* ===== Weekly Badge ===== */
.weekly-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* ===== Monthly Badge ===== */
.monthly-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* ===== Article Hero Image ===== */
.article-hero-image {
  margin: 28px 0 36px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.article-hero-image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

/* ===== Marker Highlight ===== */
.marker {
  background: linear-gradient(transparent 55%, rgba(37, 99, 235, 0.2) 55%);
  padding-bottom: 1px;
}

/* ===== Subscribe Section ===== */
.subscribe-section {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  margin: 36px 0 24px;
}
.subscribe-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.subscribe-section p { color: var(--color-text-muted); margin-bottom: 12px; font-size: 14px; }

/* ===== Footer ===== */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding-top: 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--color-text-muted); }
.footer-copy { font-size: 13px; color: var(--color-text-muted); }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
}
.pagination .active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* ===== Monthly Hero ===== */
.monthly-hero {
  background-size: cover;
  background-position: center;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
}
.monthly-hero-overlay {
  width: 100%;
  background: linear-gradient(to top, rgba(10,10,20,0.88) 0%, rgba(10,10,20,0.45) 55%, rgba(10,10,20,0.08) 100%);
  padding: 72px 0 52px;
}
.monthly-hero-content { max-width: 820px; color: #fff; }
.monthly-hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.monthly-badge-lg {
  display: inline-block;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.08em;
}
.monthly-issue { font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 500; }
.monthly-hero-title {
  font-size: clamp(22px, 3.8vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.monthly-hero-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.monthly-hero-tag {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
}
.monthly-hero-tag:hover { background: rgba(255,255,255,0.32); text-decoration: none; }

/* ===== Monthly Layout ===== */
.monthly-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 52px 0 72px;
}

/* ===== Monthly Summary Box ===== */
.monthly-summary {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.monthly-summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.monthly-summary p {
  font-size: 16px;
  line-height: 1.85;
  color: #78350f;
  margin: 0;
}

/* ===== Monthly Body Typography ===== */
.monthly-body {
  font-size: 16.5px;
  line-height: 2.0;
  color: var(--color-text);
}
.monthly-body h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 60px 0 20px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border-left: 5px solid #d97706;
  border-radius: 0 8px 8px 0;
  line-height: 1.4;
}
.monthly-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 40px 0 14px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.monthly-body h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: #d97706;
  border-radius: 2px;
  flex-shrink: 0;
}
.monthly-body p { margin-bottom: 22px; }
.monthly-body ul, .monthly-body ol { padding-left: 28px; margin-bottom: 22px; }
.monthly-body li { margin-bottom: 10px; line-height: 1.85; }
.monthly-body strong { color: #1e293b; font-weight: 700; }
.monthly-body hr {
  border: none;
  border-top: 2px dashed #fcd34d;
  margin: 48px 0;
}
.monthly-body blockquote {
  background: #f8fafc;
  border-left: 4px solid var(--color-primary);
  margin: 32px 0;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.8;
}

/* ===== Monthly Subscribe CTA ===== */
.monthly-subscribe-cta {
  margin-top: 60px;
  padding: 36px 40px;
  background: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 100%);
  border-radius: 16px;
  text-align: center;
  color: #fff;
}
.monthly-subscribe-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
}
.monthly-subscribe-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 20px;
  line-height: 1.7;
}
.monthly-subscribe-btn {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.monthly-subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  text-decoration: none;
}

.monthly-nav { max-width: 820px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .article-grid { grid-template-columns: 1fr; }
  .article-grid--2col { grid-template-columns: 1fr; }
  .single-article { padding: 24px; margin: 24px auto; }
  .subscribe-section { padding: 32px 20px; }
  .hero { padding: 48px 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .monthly-hero { min-height: 300px; }
  .monthly-hero-overlay { padding: 40px 0 32px; }
  .monthly-summary { padding: 20px; }
  .monthly-body h2 { font-size: 19px; padding: 12px 16px; }
  .monthly-body h3 { font-size: 16px; }
  .monthly-body { font-size: 15.5px; }
  .monthly-subscribe-cta { padding: 28px 20px; }
}

/* ===== Tools page ===== */
.tools-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin: -32px 0 64px;
  position: relative;
  z-index: 2;
  align-items: start;
}

.tools-sidebar {
  position: sticky;
  top: 80px;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.tools-category + .tools-category {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.tools-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 8px 12px;
}

.tools-category-icon {
  font-size: 16px;
}

.tools-tablist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tools-tab {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .12s ease, border-color .12s ease;
}

.tools-tab:hover {
  background: #f8fafc;
}

.tools-tab[aria-selected="true"] {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border-color: #bfdbfe;
}

.tools-tab-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -.02em;
}

.tools-tab-label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tools-tab-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.tools-tab-company {
  font-size: 11.5px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* Right detail */
.tools-detail {
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 44px 48px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.tools-panel-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e2e8f0;
}

.tools-panel-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .15);
}

.tools-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tools-panel-company {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 600;
  margin: 0;
}

.tools-panel-name {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.01em;
  margin: 0;
}

.tools-section {
  margin-bottom: 30px;
}

.tools-section:last-of-type {
  margin-bottom: 0;
}

.tools-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}

.tools-section-emoji {
  font-size: 18px;
}

.tools-section-body {
  font-size: 15px;
  line-height: 1.85;
  color: #334155;
}

.tools-section-body p {
  margin: 0 0 12px;
}

.tools-section-body strong {
  background: linear-gradient(transparent 65%, rgba(124, 58, 237, .14) 65%);
  padding: 0 2px;
  font-weight: 700;
  color: #0f172a;
}

.tools-section-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tools-section-list li {
  position: relative;
  padding: 10px 14px 10px 36px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: #1e293b;
}

.tools-section-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.tools-cta {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.tools-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.tools-cta-button:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

@media (max-width: 960px) {
  .tools-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: -24px 0 48px;
  }
  .tools-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .tools-tablist {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
  }
  .tools-tab {
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .tools-detail {
    padding: 28px 22px;
  }
  .tools-panel-icon {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }
  .tools-panel-name {
    font-size: 22px;
  }
  .tools-section-list li {
    font-size: 13.5px;
    padding: 10px 14px 10px 32px;
  }
}

/* ===== Affiliate disclosure & badge ===== */
.affiliate-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin: 0 0 28px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.7;
}

.affiliate-disclosure-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 3px 10px;
  background: #f59e0b;
  color: #ffffff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: 1px;
}

.affiliate-disclosure-text {
  margin: 0;
  flex: 1;
}

.affiliate-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.affiliate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: .04em;
  vertical-align: middle;
  margin-left: 2px;
  text-decoration: none;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .affiliate-disclosure {
    padding: 12px 14px;
    font-size: 12.5px;
    gap: 10px;
  }
}

/* ===== Tag pages ===== */
.tag-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
  color: #fff;
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}

.tag-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(255,255,255,.10) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,.06) 0%, transparent 50%);
  pointer-events: none;
}

.tag-hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.tag-breadcrumb {
  font-size: 13px;
  color: #ffffff;
  opacity: .8;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  opacity: .9;
}

.tag-breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

.tag-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 14px;
}

.tag-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #fff;
}

.tag-count {
  font-size: 14px;
  opacity: .82;
  margin: 0;
}

.tag-articles {
  margin-bottom: 64px;
}

.tag-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 64px;
}

.tag-empty p {
  margin: 0 0 16px;
  color: var(--color-text-muted);
}

.tag-empty-link {
  color: var(--color-primary);
  font-weight: 600;
}

.tag-related {
  margin: 0 0 64px;
  padding: 32px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.tag-related-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 16px;
}

.tag-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-related-chip {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tag-related-chip:hover {
  text-decoration: none;
  background: #eff6ff;
  color: var(--color-primary);
  border-color: #bfdbfe;
}

.tag-subscribe {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 80px;
}

.tag-subscribe-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}

.tag-subscribe-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 22px;
}

.tag-subscribe-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.tag-subscribe-button:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

/* Tags index (taxonomy) */
.tag-index {
  margin-bottom: 80px;
}

.tag-index-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-index-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.tag-index-chip:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .07);
}

.tag-index-name {
  font-weight: 700;
  color: #0f172a;
}

.tag-index-count {
  font-size: 12px;
  color: var(--color-text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .tag-hero { padding: 40px 0 48px; margin-bottom: 32px; }
  .tag-title { font-size: 26px; }
  .tag-subscribe { padding: 32px 22px; }
  .tag-subscribe-title { font-size: 16px; }
}

/* ===== Monthly Table of Contents ===== */
.monthly-toc {
  margin: 28px 0 36px;
  background: linear-gradient(135deg, #f8fafc 0%, #f5f3ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.monthly-toc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  list-style: none;
  user-select: none;
}

.monthly-toc-summary::-webkit-details-marker {
  display: none;
}

.monthly-toc-icon {
  font-size: 18px;
}

.monthly-toc-arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--color-text-muted);
  transition: transform .2s ease;
}

.monthly-toc[open] .monthly-toc-arrow {
  transform: rotate(-180deg);
}

.monthly-toc-body {
  padding: 4px 22px 18px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.monthly-toc-body nav ul,
.monthly-toc-body > ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.monthly-toc-body nav ul ul,
.monthly-toc-body > ul ul {
  padding-left: 18px;
  margin: 4px 0;
}

.monthly-toc-body li {
  margin: 6px 0;
  position: relative;
  padding-left: 16px;
  line-height: 1.55;
}

.monthly-toc-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: #cbd5e1;
}

.monthly-toc-body a {
  color: #334155;
  font-size: 14px;
  text-decoration: none;
  transition: color .12s ease;
}

.monthly-toc-body a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.monthly-toc-body li li a {
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ===== Article meta helpers ===== */
.article-meta-dot {
  color: var(--color-text-muted);
  opacity: .6;
}
.article-meta-time {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ===== 404 page ===== */
.error-page {
  padding: 80px 0 100px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, .06) 0%, transparent 50%);
  min-height: calc(100vh - 64px - 200px);
  display: flex;
  align-items: center;
}

.error-page-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.error-page-code {
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  user-select: none;
}

.error-page-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

.error-page-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.85;
  margin: 0 0 36px;
}

.error-page-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.error-page-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.error-page-btn-primary:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

.error-page-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}

.error-page-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.error-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  padding-top: 28px;
  margin-bottom: 56px;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
}

.error-page-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.error-page-links a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.error-page-recent {
  margin-top: 24px;
}

.error-page-recent-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 20px;
}

.error-page-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: left;
}

.error-page-recent-card {
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.error-page-recent-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
  border-color: #cbd5e1;
}

.error-page-recent-card time {
  font-size: 11.5px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.error-page-recent-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 6px 0 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 720px) {
  .error-page { padding: 56px 0 72px; }
  .error-page-code { font-size: 92px; }
  .error-page-title { font-size: 22px; }
  .error-page-desc { font-size: 14px; }
  .error-page-recent-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Search ===== */
.btn-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.btn-search:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-search svg {
  flex-shrink: 0;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.search-modal.is-open {
  display: block;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  animation: searchFade .18s ease;
}

.search-modal-panel {
  position: relative;
  max-width: 680px;
  margin: 60px auto;
  padding: 28px 24px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: searchSlide .2s ease;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

#search {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 4px -8px 0;
  padding: 0 8px;
}

/* Smooth scrollbar styling */
#search::-webkit-scrollbar {
  width: 8px;
}
#search::-webkit-scrollbar-track {
  background: transparent;
}
#search::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
#search::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes searchFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes searchSlide {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.search-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.search-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.search-modal-hint {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin: 12px 0 0;
}

body.search-open {
  overflow: hidden;
}

/* Override Pagefind defaults to match our brand */
:root {
  --pagefind-ui-scale: 0.85;
  --pagefind-ui-primary: #2563eb;
  --pagefind-ui-text: #0f172a;
  --pagefind-ui-background: #ffffff;
  --pagefind-ui-border: #e2e8f0;
  --pagefind-ui-tag: #eff6ff;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 10px;
  --pagefind-ui-image-border-radius: 8px;
  --pagefind-ui-font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

@media (max-width: 640px) {
  .btn-search-label {
    display: none;
  }
  .btn-search {
    padding: 8px;
  }
  .search-modal-panel {
    margin: 16px;
    padding: 24px 16px 16px;
  }
}

/* ===== Newsletter landing page ===== */
.newsletter-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 880px;
  margin: -56px auto 64px;
  position: relative;
  z-index: 2;
}

.newsletter-stat {
  background: var(--color-surface);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
  border: 1px solid #e2e8f0;
}

.newsletter-stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.newsletter-stat-number span {
  font-size: 18px;
  font-weight: 700;
  margin-left: 2px;
}

.newsletter-stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.newsletter-section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
  letter-spacing: -.005em;
  margin: 0 0 12px;
  position: relative;
  display: block;
}

.newsletter-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

.newsletter-promise {
  margin-bottom: 72px;
}

.newsletter-promise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-promise-card {
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px 22px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.newsletter-promise-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.newsletter-promise-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.newsletter-promise-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.newsletter-promise-card p {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0;
}

.newsletter-samples {
  margin-bottom: 72px;
}

.newsletter-samples-desc {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.newsletter-samples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}

.newsletter-sample-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 26px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}

.newsletter-sample-card::before {
  content: "📩";
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 18px;
  opacity: .5;
}

.newsletter-sample-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
  border-color: #cbd5e1;
}

.newsletter-sample-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.newsletter-sample-date {
  font-weight: 600;
}

.newsletter-sample-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.5;
}

.newsletter-sample-summary {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 16px;
  flex-grow: 1;
}

.newsletter-sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.newsletter-sample-tag {
  font-size: 11.5px;
  color: var(--color-primary);
  background: #eff6ff;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.newsletter-sample-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.newsletter-voice {
  background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
  border-radius: 18px;
  padding: 48px 32px;
  margin-bottom: 72px;
  border: 1px solid #dbeafe;
}

.newsletter-voice-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.newsletter-voice-quote {
  font-size: 64px;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: "Georgia", serif;
  margin-bottom: 8px;
}

.newsletter-voice-body {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.85;
  margin: 0 0 18px;
}

.newsletter-voice-signature {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 600;
  margin: 0;
}

.newsletter-cta {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
  color: #fff;
  border-radius: 18px;
  padding: 56px 32px;
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.newsletter-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0%, transparent 50%);
  pointer-events: none;
}

.newsletter-cta-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
  position: relative;
}

.newsletter-cta-desc {
  font-size: 15px;
  opacity: .92;
  margin: 0 0 26px;
  position: relative;
}

.newsletter-cta-button {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  padding: 16px 40px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}

.newsletter-cta-button:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .3);
  color: var(--color-primary);
}

.newsletter-cta-note {
  font-size: 12px;
  opacity: .8;
  margin: 16px 0 0;
  position: relative;
}

@media (max-width: 768px) {
  .newsletter-stats {
    grid-template-columns: 1fr;
    margin: -32px 16px 48px;
  }
  .newsletter-section-title { font-size: 22px; }
  .newsletter-promise-grid,
  .newsletter-samples-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-voice { padding: 36px 20px; }
  .newsletter-voice-body { font-size: 16px; }
  .newsletter-cta { padding: 44px 24px; }
  .newsletter-cta-title { font-size: 22px; }
  .newsletter-cta-button { padding: 14px 32px; font-size: 15px; }
}

/* ===== Related Articles ===== */
.related-articles {
  margin: 56px 0 16px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.related-articles-header {
  text-align: center;
  margin-bottom: 28px;
}

.related-articles-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.005em;
  margin: 0 0 6px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.related-articles-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

.related-articles-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background: var(--color-surface);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}

.related-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.related-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  border-color: #cbd5e1;
}

.related-card:hover::before {
  transform: scaleX(1);
}

.related-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.related-card-section {
  padding: 2px 8px;
  background: #eff6ff;
  color: var(--color-primary);
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}

.related-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: #0f172a;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-summary {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.related-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.related-card-link span {
  transition: transform .15s ease;
}

.related-card:hover .related-card-link span {
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .related-articles { margin: 40px 0 8px; padding-top: 28px; }
  .related-articles-title { font-size: 19px; }
  .related-articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .related-card { padding: 18px 20px; }
}

/* ===== Article inline CTA ===== */
.article-cta {
  margin: 48px 0 8px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.article-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, .06) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, .06) 0%, transparent 50%);
  pointer-events: none;
}

.article-cta-icon {
  position: relative;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
}

.article-cta-body {
  position: relative;
}

.article-cta-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.article-cta-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 6px;
}

.article-cta-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.article-cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.article-cta-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .35);
  color: #fff;
}

.article-cta-button span {
  font-size: 16px;
  transition: transform .15s ease;
}

.article-cta-button:hover span {
  transform: translateX(2px);
}

@media (max-width: 720px) {
  .article-cta {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
    gap: 14px;
  }
  .article-cta-icon {
    margin: 0 auto;
  }
  .article-cta-button {
    justify-content: center;
    width: 100%;
  }
}

/* ===== Static Pages (about, privacy) ===== */
.page-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
  color: #fff;
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.page-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 20px;
}

.page-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #fff;
}

.page-lead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  opacity: .92;
  max-width: 640px;
  margin: 0 auto;
}

.page-article {
  max-width: 760px;
  margin: -56px auto 80px;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .04);
  padding: 56px 64px;
  position: relative;
  z-index: 2;
}

.page-body {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.85;
}

.page-body > p:first-child {
  font-size: 17px;
  color: #334155;
}

.page-body h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.005em;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
  color: #0f172a;
}

.page-body h2::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.page-body h2:first-child {
  margin-top: 0;
}

.page-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: #1e293b;
}

.page-body p {
  margin-bottom: 18px;
}

.page-body strong {
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(transparent 65%, rgba(124, 58, 237, .12) 65%);
  padding: 0 2px;
}

.page-body a {
  color: var(--color-primary);
  font-weight: 500;
  border-bottom: 1px solid rgba(37, 99, 235, .25);
  transition: border-color .15s ease;
}

.page-body a:hover {
  text-decoration: none;
  border-bottom-color: var(--color-primary);
}

.page-body ul,
.page-body ol {
  margin: 16px 0 22px;
  padding-left: 24px;
}

.page-body li {
  margin-bottom: 8px;
}

.page-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
  margin: 40px 0;
}

.page-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  font-size: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.page-body table thead {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.page-body table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.page-body table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.page-body table tr:last-child td {
  border-bottom: none;
}

.page-body table tr:hover td {
  background: #f8fafc;
}

.page-body blockquote {
  margin: 24px 0;
  padding: 18px 24px;
  background: #f8fafc;
  border-left: 4px solid var(--color-primary);
  border-radius: 4px 8px 8px 4px;
  color: #475569;
  font-style: italic;
}

.page-meta {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: right;
}

@media (max-width: 768px) {
  .page-hero { padding: 56px 0 72px; }
  .page-title { font-size: 30px; }
  .page-lead { font-size: 15px; }
  .page-article {
    margin: -40px 16px 56px;
    padding: 32px 24px;
    border-radius: 12px;
  }
  .page-body { font-size: 15px; }
  .page-body h2 { font-size: 19px; }
  .page-body table { font-size: 13.5px; }
  .page-body table th,
  .page-body table td { padding: 10px 12px; }
}

