.ai-graph-page {
  --ai-page-bg: #f6f8ff;
  --ai-page-bg-deep: #eef3ff;
  --ai-surface: rgba(255, 255, 255, 0.88);
  --ai-surface-strong: #ffffff;
  --ai-surface-soft: rgba(244, 247, 255, 0.92);
  --ai-text: #111827;
  --ai-heading: #0f172a;
  --ai-muted: #667085;
  --ai-muted-strong: #475467;
  --ai-border: rgba(105, 129, 210, 0.18);
  --ai-border-strong: rgba(88, 109, 197, 0.34);
  --ai-blue: #2f6df6;
  --ai-indigo: #6057f5;
  --ai-purple: #8b5cf6;
  --ai-gradient: linear-gradient(135deg, #2f6df6 0%, #6057f5 52%, #8b5cf6 100%);
  --ai-gradient-soft: linear-gradient(135deg, rgba(47, 109, 246, 0.12), rgba(139, 92, 246, 0.11));
  --ai-shadow: 0 18px 48px rgba(38, 58, 140, 0.11);
  --ai-shadow-soft: 0 10px 28px rgba(38, 58, 140, 0.08);
  --page-bg: var(--ai-page-bg);
  --surface: var(--ai-surface);
  --surface-soft: var(--ai-surface-soft);
  --border: var(--ai-border);
  --text-main: var(--ai-text);
  --text-muted: var(--ai-muted);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --ink-soft: var(--ai-muted-strong);
  --graph-bg: #020617;
  position: relative;
  padding: 34px 0 70px;
  background:
    radial-gradient(circle at 12% 6%, rgba(83, 125, 255, 0.17), transparent 31%),
    radial-gradient(circle at 84% 2%, rgba(139, 92, 246, 0.14), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, var(--ai-page-bg) 38%, var(--ai-page-bg-deep) 100%);
  color: var(--text-main);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.ai-graph-page *,
.ai-graph-page *::before,
.ai-graph-page *::after {
  box-sizing: border-box;
}

.ai-graph-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.ai-graph-hero {
  position: relative;
  height: clamp(520px, 64vh, 680px);
  min-height: 520px;
  border-radius: 18px;
  border: 1px solid rgba(105, 129, 210, 0.24);
  background: var(--graph-bg);
  box-shadow: var(--ai-shadow);
  overflow: hidden;
}

.ai-graph-hero::before,
.ai-graph-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-graph-hero::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.ai-graph-hero::after {
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 40%);
}

.ai-graph-hero__eyebrow {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  color: rgba(232, 243, 255, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.ai-graph-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
}

.ai-graph-legend {
  user-select: none;
  -webkit-user-select: none;
}

.ai-graph-legend__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(3, 10, 22, 0.54);
  color: rgba(232, 242, 255, 0.88);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font: inherit;
}

.ai-graph-legend__toggle-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 700;
}

.ai-graph-legend__toggle-text {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.ai-graph-legend__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  background: rgba(3, 10, 22, 0.82);
  backdrop-filter: blur(10px);
  color: rgba(219, 236, 255, 0.82);
  font-size: 0.78rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.ai-graph-legend:hover .ai-graph-legend__panel,
.ai-graph-legend.is-open .ai-graph-legend__panel,
.ai-graph-legend:focus-within .ai-graph-legend__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ai-graph-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-graph-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ai-graph-dot-core {
  background: radial-gradient(circle, #e4f8ff, #73daff 56%, #3f64ff);
  box-shadow: 0 0 12px rgba(116, 220, 255, 0.8);
}

.ai-graph-dot-article {
  background: radial-gradient(circle, #fff7e3, #ffd579 58%, #ff9f4e);
  box-shadow: 0 0 9px rgba(255, 213, 121, 0.64);
}

.ai-graph-dot-cluster {
  background: radial-gradient(circle, #eef3ff, #b7ccff 62%, #7a8eff);
  box-shadow: 0 0 11px rgba(183, 204, 255, 0.74);
}

.ai-graph-legend-note {
  color: rgba(220, 236, 255, 0.62);
}

#graph-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ai-graph-section {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--ai-shadow);
  backdrop-filter: blur(16px);
}

.ai-graph-section__header {
  margin-bottom: 16px;
}

.ai-graph-section__header--with-copy {
  display: grid;
  gap: 6px;
}

.ai-graph-section__title {
  margin: 0;
  color: var(--ai-heading);
  font-size: clamp(1.22rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.ai-graph-section__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.ai-graph-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ai-graph-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  min-height: 196px;
  padding: 20px 22px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.90)),
    var(--ai-surface-strong);
  color: var(--text-main);
  text-decoration: none;
  box-shadow: var(--ai-shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ai-graph-card:hover {
  transform: translateY(-2px);
  border-color: var(--ai-border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.95)),
    var(--ai-surface-strong);
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.12);
}

.ai-graph-card__icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 28px;
  color: var(--accent);
}

.ai-graph-card__glyph {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 180ms ease, transform 180ms ease;
}

.ai-graph-card:hover .ai-graph-card__icon {
  color: var(--accent);
}

.ai-graph-card:hover .ai-graph-card__glyph {
  transform: translateX(1px);
}

.ai-graph-basic-card__visual {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 150px;
  height: 158px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 16% 8%, rgba(47, 109, 246, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 247, 255, 0.92));
  overflow: hidden;
}

.ai-graph-basic-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}


.ai-graph-card__title,
.ai-graph-basic-card__title {
  margin: 0;
  color: var(--ai-heading);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.ai-graph-card__copy,
.ai-graph-basic-card__copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.ai-graph-card__cta {
  align-self: end;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform 180ms ease, color 180ms ease;
}

.ai-graph-card:hover .ai-graph-card__cta {
  transform: translateX(4px);
  color: var(--accent);
}

.ai-graph-card__marker {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 18px;
}

.ai-graph-card__marker span {
  position: absolute;
  display: block;
  background: #c9c8c0;
  border-radius: 999px;
  transition: background 180ms ease, transform 180ms ease;
}

.ai-graph-card__marker span:nth-child(1) {
  width: 10px;
  height: 2px;
  top: 4px;
  left: 0;
}

.ai-graph-card__marker span:nth-child(2) {
  width: 6px;
  height: 6px;
  top: 0;
  left: 11px;
  border-radius: 50%;
}

.ai-graph-card__marker span:nth-child(3) {
  width: 18px;
  height: 2px;
  left: 8px;
  bottom: 4px;
}

.ai-graph-card__index,
.ai-principle-index {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0.12em;
  font-weight: 600;
  transition: color 180ms ease;
}

.ai-graph-card:hover .ai-graph-card__index,
.ai-graph-card:hover .ai-graph-card__marker span:nth-child(2) {
  color: var(--accent);
  background: var(--accent);
}

.ai-graph-basics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ai-graph-basic-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.90)),
    var(--ai-surface-strong);
  box-shadow: var(--ai-shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ai-graph-basic-card:hover {
  transform: translateY(-2px);
  border-color: var(--ai-border-strong);
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.12);
}

.ai-explain-illustration {
  width: 100%;
  height: 100%;
}

.ai-explain-illustration .ai-ill-card,
.ai-explain-illustration .ai-ill-frame,
.ai-explain-illustration .ai-ill-stage,
.ai-explain-illustration .ai-ill-corebox,
.ai-explain-illustration .ai-ill-success-ring {
  stroke: #c9c5bc;
  stroke-width: 1.6;
}

.ai-explain-illustration .ai-ill-card,
.ai-explain-illustration .ai-ill-corebox {
  fill: rgba(255,255,255,0.96);
}

.ai-explain-illustration .ai-ill-frame {
  fill: rgba(255,255,255,0.5);
}

.ai-explain-illustration .ai-ill-stage,
.ai-explain-illustration .ai-ill-success-ring {
  fill: rgba(250,248,244,0.94);
}

.ai-explain-illustration .ai-ill-wire,
.ai-explain-illustration .ai-ill-flow,
.ai-explain-illustration .ai-ill-brain,
.ai-explain-illustration .ai-ill-db,
.ai-explain-illustration .ai-ill-globe,
.ai-explain-illustration .ai-ill-gear,
.ai-explain-illustration .ai-ill-dashed,
.ai-explain-illustration .ai-ill-core-web {
  stroke: #bdb7ac;
  stroke-width: 1.6;
}

.ai-explain-illustration .ai-ill-dashed {
  stroke-dasharray: 4 6;
}

.ai-explain-illustration .ai-ill-soft {
  stroke: #d1ccc3;
  stroke-width: 2;
}

.ai-explain-illustration .accent-soft {
  stroke: rgba(31, 94, 255, 0.28);
}

.ai-explain-illustration .ai-ill-wave {
  stroke: #c9c3b8;
  stroke-width: 1.6;
}

.ai-explain-illustration .ai-ill-pin,
.ai-explain-illustration .ai-ill-core-point,
.ai-explain-illustration .ai-ill-dot {
  fill: #d4cec4;
  stroke: none;
}

.ai-explain-illustration .ai-ill-muted-fill,
.ai-explain-illustration .ai-ill-soft-fill {
  fill: #ece7dd;
  stroke: none;
}

.ai-explain-illustration .ai-ill-core-ring,
.ai-explain-illustration .ai-ill-core-inner {
  fill: rgba(255,255,255,0.72);
  stroke: #bdb7ac;
  stroke-width: 1.6;
}

.ai-explain-illustration .ai-ill-core-node {
  fill: rgba(250,247,241,0.98);
  stroke: #c4bfb4;
  stroke-width: 1.6;
}

.ai-explain-illustration .ai-ill-accent-fill {
  fill: rgba(215, 182, 116, 0.68);
  stroke: none;
}

.ai-explain-illustration .ai-ill-play-fill,
.ai-explain-illustration .ai-ill-arrowhead {
  fill: #8c8778;
  stroke: none;
}

.ai-explain-illustration .ai-ill-success {
  stroke: #8c8a66;
  stroke-width: 2.6;
}

.ai-graph-feed__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-graph-feed__item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.90)),
    var(--ai-surface-strong);
  box-shadow: var(--ai-shadow-soft);
}

.ai-graph-feed__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ai-graph-feed__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ai-gradient-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1;
}

.ai-graph-feed__title {
  margin: 0;
  color: var(--ai-heading);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.4;
}

.ai-graph-feed__title a {
  color: var(--text-main);
  text-decoration: none;
}

.ai-graph-feed__title a:hover,
.ai-graph-feed__link:hover {
  color: var(--accent);
}

.ai-graph-feed__excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-graph-feed__link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.ai-graph-feed__empty {
  color: var(--text-muted);
}

body.home.wp-child-theme-ai-news-child footer.mt-16 {
  margin-top: 64px !important;
  background: rgba(255, 255, 255, 0.66) !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: 0 -10px 30px rgba(38, 58, 140, 0.05) !important;
  backdrop-filter: blur(16px);
}

.ai-news-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.ai-news-footer__brand {
  display: grid;
  gap: 4px;
}

.ai-news-footer__eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-news-footer__title {
  color: var(--ai-heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.ai-news-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.ai-news-footer__nav a {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.ai-news-footer__nav a:hover {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .ai-graph-shell {
    width: min(100%, calc(100% - 32px));
  }
}

@media (max-width: 900px) {
  .ai-news-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-news-footer__nav {
    justify-content: flex-start;
  }

  .ai-graph-page {
    padding: 18px 0 36px;
  }

  .ai-graph-shell {
    width: calc(100% - 24px);
    gap: 16px;
  }

  .ai-graph-hero {
    height: 68vh;
    min-height: 68vh;
    border-radius: 18px;
  }

  .ai-graph-hero__eyebrow {
    top: 14px;
    left: 14px;
  }

  .ai-graph-overlay {
    top: 14px;
    right: 14px;
  }

  .ai-graph-cards,
  .ai-graph-basics__grid,
  .ai-graph-feed__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ai-news-footer__title {
    font-size: 0.92rem;
  }

  .ai-news-footer__nav {
    gap: 8px 12px;
  }

  .ai-graph-page {
    padding: 12px 0 28px;
  }

  .ai-graph-shell {
    width: calc(100% - 16px);
    gap: 12px;
  }

  .ai-graph-hero {
    height: 68vh;
    min-height: 68vh;
  }

  .ai-graph-cards,
  .ai-graph-basics__grid,
  .ai-graph-feed__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-graph-legend__toggle {
    padding: 8px 10px;
  }

  .ai-graph-legend__toggle-text {
    font-size: 0.74rem;
  }

  .ai-graph-legend__panel {
    min-width: 160px;
    font-size: 0.76rem;
  }

  .ai-graph-card,
  .ai-graph-basic-card,
  .ai-graph-feed__item {
    padding: 16px;
  }
}
