:root {
  --ink: #f3f7f2;
  --muted: #a7b4aa;
  --soft: #748277;
  --line: rgba(206, 226, 211, 0.16);
  --panel: rgba(12, 20, 18, 0.74);
  --paper: #08100e;
  --accent: #8cc7af;
  --accent-strong: #d8f6e7;
  --blue: var(--accent);
  --teal: #6fb8a6;
  --green: #a9d6a7;
  --amber: #d8bd82;
  --rose: #c78391;
  --violet: #9f9ac6;
  --shadow: 0 32px 90px rgba(2, 7, 5, 0.38);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font-sans: "Avenir Next", "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 18% 14%, rgba(140, 199, 175, 0.18), transparent 30%),
    radial-gradient(circle at 84% 10%, rgba(216, 189, 130, 0.08), transparent 28%),
    radial-gradient(circle at 64% 78%, rgba(111, 184, 166, 0.1), transparent 34%),
    linear-gradient(180deg, #101816 0%, #08100e 48%, #050908 100%);
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 7% 12%, rgba(255, 255, 255, 0.74) 0 1px, transparent 1.7px),
    radial-gradient(circle at 18% 39%, rgba(147, 190, 255, 0.46) 0 1.2px, transparent 2px),
    radial-gradient(circle at 31% 22%, rgba(255, 255, 255, 0.58) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 44% 77%, rgba(142, 184, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 59% 16%, rgba(255, 255, 255, 0.48) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 73% 58%, rgba(155, 206, 255, 0.42) 0 1.1px, transparent 2px),
    radial-gradient(circle at 89% 28%, rgba(255, 255, 255, 0.62) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 94% 82%, rgba(130, 173, 255, 0.34) 0 1.2px, transparent 2.2px);
  opacity: 0.58;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  border-radius: 999px;
  padding: 10px 14px;
  color: #07100d;
  background: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-72px);
  transition: transform 0.45s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100dvh;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  border: 1px solid rgba(206, 226, 211, 0.14);
  border-radius: 999px;
  padding: 10px 12px 10px 16px;
  background:
    radial-gradient(circle at 14% 18%, rgba(216, 246, 231, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(13, 22, 20, 0.84), rgba(9, 16, 14, 0.68));
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 70px rgba(2, 7, 5, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header::before,
.site-header::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.site-header::before {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 7% 30%, rgba(255, 255, 255, 0.64) 0 0.8px, transparent 1.6px),
    radial-gradient(circle at 24% 72%, rgba(136, 188, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 43% 18%, rgba(255, 255, 255, 0.42) 0 0.7px, transparent 1.7px),
    radial-gradient(circle at 68% 62%, rgba(141, 198, 255, 0.36) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 91% 32%, rgba(255, 255, 255, 0.5) 0 0.8px, transparent 1.7px);
  opacity: 0.72;
}

.site-header::after {
  right: 24px;
  bottom: 0;
  left: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 246, 231, 0.2), transparent);
  opacity: 0.75;
}

.brand,
.header-nav,
.hero-actions,
.summary-strip,
.result-nav,
.export-actions {
  display: flex;
  align-items: center;
}

.brand {
  position: relative;
  z-index: 1;
  gap: 12px;
  color: #f5fbf6;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(216, 246, 231, 0.1);
}

.brand-mark {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(174, 206, 255, 0.22);
  border-radius: 15px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.28), transparent 22%),
    radial-gradient(circle at 72% 68%, rgba(140, 199, 175, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(12, 24, 21, 0.98), rgba(52, 111, 91, 0.86));
  box-shadow: 0 0 24px rgba(140, 199, 175, 0.26), 0 12px 28px rgba(2, 7, 5, 0.26);
}

.brand-mark b {
  position: absolute;
  right: 6px;
  bottom: 5px;
  color: rgba(238, 246, 255, 0.88);
  font-size: 9px;
  line-height: 1;
}

.brand-star,
.brand-line {
  position: absolute;
  display: block;
  pointer-events: none;
}

.brand-star {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5fbff;
  box-shadow: 0 0 10px rgba(210, 232, 255, 0.86);
}

.brand-star-a { top: 11px; left: 10px; }
.brand-star-b { top: 17px; right: 10px; }
.brand-star-c { bottom: 10px; left: 16px; }

.brand-line {
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.16), rgba(219, 234, 254, 0.78));
  transform-origin: left center;
}

.brand-line-a {
  top: 15px;
  left: 15px;
  transform: rotate(18deg);
}

.brand-line-b {
  top: 22px;
  left: 17px;
  transform: rotate(120deg);
}

.header-nav {
  position: relative;
  z-index: 1;
  gap: 6px;
  color: #c6d2c8;
  font-size: 14px;
}

.header-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 13px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease), color 0.45s var(--ease);
}

.header-nav a:hover {
  color: #f5fbf6;
  border-color: rgba(216, 246, 231, 0.16);
  background: rgba(216, 246, 231, 0.09);
  transform: translateY(-1px);
}

.header-nav a:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(216, 246, 231, 0.72);
  outline-offset: 3px;
}

.stage {
  display: none;
}

.stage.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: clamp(36px, 7vw, 108px);
  align-items: center;
  min-height: calc(100dvh - 118px);
  padding: clamp(70px, 9vw, 130px) clamp(20px, 7vw, 104px) 48px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(46px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 650px;
  margin: 22px 0 0;
  color: #b8c5bd;
  font-size: 17px;
  line-height: 1.8;
  text-wrap: pretty;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action,
.research-form button,
.export-actions button,
.back-button {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 800;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.primary-action::after,
.secondary-action::after {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-left: 10px;
  place-items: center;
  border-radius: 50%;
  content: "↗";
  background: rgba(255, 255, 255, 0.13);
  transition: transform 0.45s var(--ease), background 0.45s var(--ease);
}

.primary-action:hover::after,
.secondary-action:hover::after {
  transform: translate(3px, -1px) scale(1.04);
}

.primary-action:active,
.secondary-action:active,
.research-form button:active,
.export-actions button:active,
.back-button:active,
.hot-list button:active,
.canvas-controls button:active {
  transform: translateY(1px) scale(0.98);
}

.primary-action,
.research-form button {
  color: #07100d;
  background: linear-gradient(135deg, #d8f6e7, #8cc7af);
  box-shadow: 0 18px 36px rgba(2, 7, 5, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.secondary-action,
.export-actions button,
.back-button {
  color: #edf7ef;
  background: rgba(15, 26, 23, 0.72);
  border-color: var(--line);
}

.primary-action:hover,
.research-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(2, 7, 5, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.secondary-action:hover,
.export-actions button:hover,
.back-button:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 246, 231, 0.26);
  background: rgba(216, 246, 231, 0.1);
}

.method-visual {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(216, 246, 231, 0.12);
  border-radius: 32px;
  padding: 8px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 52% 48%, rgba(140, 199, 175, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(13, 25, 22, 0.94), rgba(4, 9, 8, 0.76));
  box-shadow: 0 30px 90px rgba(2, 7, 5, 0.34), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  animation: card-rise 0.9s var(--ease) both;
}

.method-visual::before,
.method-visual::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.method-visual::before {
  inset: 8px;
  z-index: 1;
  border: 1px solid rgba(216, 246, 231, 0.08);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.method-visual::after {
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 9, 8, 0.06), rgba(5, 9, 8, 0.18)),
    radial-gradient(circle at 50% 50%, transparent 48%, rgba(5, 9, 8, 0.34) 100%);
}

.knowledge-graph-art {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 24px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.01);
}

.visual-caption {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 26px;
  left: 28px;
  color: rgba(202, 219, 242, 0.76);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.visual-status {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(237, 247, 239, 0.68);
  font-size: 11px;
  font-weight: 800;
}

.visual-status span {
  border: 1px solid rgba(216, 246, 231, 0.12);
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(8, 16, 14, 0.5);
}

.method-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.92fr 1.05fr;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 7vw, 104px) 72px;
}

.method-grid article,
.search-card,
.glass-panel,
.result-section,
.graph-panel {
  border: 1px solid rgba(174, 206, 255, 0.16);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(2, 7, 5, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.method-grid article {
  position: relative;
  min-height: 168px;
  padding: 22px;
  background:
    radial-gradient(circle at 12% 14%, rgba(216, 246, 231, 0.09), transparent 26%),
    rgba(12, 20, 18, 0.56);
  transition: transform 0.55s var(--ease), border-color 0.55s var(--ease), background 0.55s var(--ease);
}

.method-grid article:nth-child(2) {
  margin-top: 34px;
}

.method-grid article:nth-child(3) {
  margin-top: -14px;
}

.method-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 246, 231, 0.24);
  background:
    radial-gradient(circle at 12% 14%, rgba(216, 246, 231, 0.14), transparent 30%),
    rgba(13, 23, 20, 0.7);
}

.method-grid span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
}

.method-grid h2,
.search-card h2,
.result-hero h2,
.section-heading h3 {
  margin: 8px 0 0;
  letter-spacing: 0;
}

.method-grid h2 {
  font-size: 22px;
}

.method-grid p,
.search-card p,
.glass-panel p,
.note-card p,
.path-step p {
  color: var(--muted);
  line-height: 1.7;
}

.search-stage {
  min-height: calc(100dvh - 82px);
  padding: clamp(46px, 8vw, 112px) 20px;
}

.search-card {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 12%, rgba(216, 246, 231, 0.11), transparent 26%),
    linear-gradient(135deg, rgba(13, 24, 21, 0.86), rgba(7, 13, 12, 0.84));
}

.search-card::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(216, 246, 231, 0.08);
  border-radius: 16px;
  pointer-events: none;
  content: "";
}

.search-card h2 {
  font-size: clamp(34px, 5vw, 60px);
}

.search-card p {
  max-width: 660px;
  margin: 16px 0 26px;
}

.search-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 12px;
}

.model-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(123, 181, 255, 0.28);
  border-radius: 999px;
  padding: 8px 11px;
  color: #e4eee6;
  background: rgba(8, 16, 14, 0.82);
  box-shadow: 0 0 22px rgba(140, 199, 175, 0.11);
  font-weight: 800;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

.model-pill span {
  color: #94a8c7;
  font-size: 12px;
}

.model-pill strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.model-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 246, 231, 0.28);
}

.generation-status {
  color: var(--muted);
  font-size: 13px;
  min-height: 20px;
  margin: -10px 0 20px;
}

.generation-status.is-error {
  border: 1px solid rgba(255, 173, 122, 0.28);
  border-radius: 8px;
  padding: 9px 11px;
  color: #ffe0c2;
  background: rgba(122, 46, 19, 0.18);
}

.loading-experience {
  display: none;
  margin: -6px 0 24px;
  border: 1px solid rgba(123, 181, 255, 0.18);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(12, 22, 19, 0.9), rgba(6, 13, 11, 0.84)),
    repeating-linear-gradient(90deg, rgba(216, 246, 231, 0.04) 0 1px, transparent 1px 28px);
  box-shadow: 0 18px 42px rgba(2, 7, 5, 0.22);
}

.loading-experience.active {
  display: block;
}

.loading-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.loader-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent, rgba(216, 246, 231, 0.42), transparent),
    rgba(216, 246, 231, 0.08);
  background-size: 220% 100%, auto;
  animation: shimmer 1.6s var(--ease) infinite;
}

.loader-mark::after {
  position: absolute;
  inset: 10px;
  border-radius: 8px;
  background: #08100e;
  content: "";
}

.loading-head strong {
  display: block;
  font-size: 15px;
}

.loading-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.loading-head em {
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.progress-track {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(174, 206, 255, 0.12);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transition: width 0.45s var(--ease);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.progress-step span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #9fb0ca;
  background: rgba(174, 206, 255, 0.12);
}

.progress-step.active,
.progress-step.done {
  color: #dce9ff;
}

.progress-step.active span,
.progress-step.done span {
  color: #07100d;
  background: var(--accent-strong);
}

.config-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 20px;
}

.config-modal.open {
  display: grid;
}

.config-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 6, 0.68);
  backdrop-filter: blur(8px);
}

.config-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  border: 1px solid rgba(174, 206, 255, 0.18);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(10, 18, 16, 0.96);
  box-shadow: 0 30px 90px rgba(2, 7, 5, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.config-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #e8f2ea;
  background: rgba(216, 246, 231, 0.1);
  font-size: 22px;
  line-height: 1;
}

.config-dialog h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.config-intro,
.config-note {
  color: var(--muted);
  line-height: 1.7;
}

.config-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.config-grid label {
  display: grid;
  gap: 7px;
  color: #d7e6fb;
  font-size: 13px;
  font-weight: 800;
}

.config-grid small {
  color: var(--soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.config-grid input {
  padding: 12px;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.config-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(216, 246, 231, 0.1);
  font-weight: 800;
}

.config-actions button:first-child {
  color: #07100d;
  border-color: transparent;
  background: var(--accent-strong);
}

.config-note {
  margin: 14px 0 0;
  font-size: 13px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  margin-bottom: 26px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(5, 10, 9, 0.72);
  outline: none;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

input:focus {
  border-color: rgba(216, 246, 231, 0.64);
  box-shadow: 0 0 0 4px rgba(216, 246, 231, 0.1);
  background: rgba(7, 14, 12, 0.9);
}

.hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hot-list button,
.result-nav a,
.tag,
.mini-relations span,
.confidence,
.relation-title span {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hot-list button {
  border: 1px solid var(--line);
  color: #e7f1e9;
  background: rgba(12, 20, 18, 0.72);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.hot-list button:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 246, 231, 0.28);
  background: rgba(216, 246, 231, 0.1);
}

.result-stage {
  padding: 0;
}

.recursive-map-page {
  position: relative;
  height: calc(100dvh - 79px);
  min-height: 680px;
  overflow: hidden;
  padding: 0;
}

.map-topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(216, 246, 231, 0.16);
  border-radius: 999px;
  padding: 6px;
  background: rgba(8, 16, 14, 0.72);
  box-shadow: 0 0 28px rgba(140, 199, 175, 0.14), 0 18px 54px rgba(2, 7, 5, 0.22);
  backdrop-filter: blur(18px);
}

.map-topbar > div,
.map-topbar .map-stats {
  display: none;
}

.map-topbar h2 {
  margin: 0;
  overflow: hidden;
  color: #e6f0ff;
  font-size: 15px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-topbar .eyebrow {
  display: none;
}

.map-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.map-stats span {
  border: 1px solid rgba(174, 206, 255, 0.12);
  border-radius: 999px;
  padding: 5px 8px;
  color: #aebfd8;
  background: rgba(12, 26, 56, 0.86);
  font-size: 11px;
  font-weight: 850;
}

.map-stats strong {
  color: #f4f8ff;
  font-size: 12px;
}

.recursive-canvas {
  position: absolute;
  inset: 0;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(140, 199, 175, 0.18), transparent 35%),
    radial-gradient(ellipse at 71% 25%, rgba(216, 189, 130, 0.08), transparent 27%),
    radial-gradient(ellipse at 21% 76%, rgba(111, 184, 166, 0.1), transparent 24%),
    linear-gradient(180deg, #0a1512 0%, #050908 100%);
  box-shadow: none;
}

.recursive-canvas::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at 48% 50%, rgba(216, 246, 231, 0.1), transparent 42%),
    radial-gradient(ellipse at 42% 58%, rgba(255, 255, 255, 0.055), transparent 31%);
  opacity: 0.82;
}

.recursive-canvas::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 46% 48%, transparent 0 24%, rgba(5, 11, 9, 0.22) 66%, rgba(3, 7, 5, 0.68) 100%),
    linear-gradient(90deg, rgba(216, 246, 231, 0.016) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216, 246, 231, 0.012) 1px, transparent 1px);
  background-size: auto, 73px 73px, 91px 91px;
  mask-image: radial-gradient(circle at 50% 48%, black, transparent 88%);
}

.canvas-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
  border: 1px solid rgba(174, 206, 255, 0.18);
  border-radius: 999px;
  padding: 6px;
  background: rgba(8, 16, 14, 0.76);
  box-shadow: 0 0 28px rgba(140, 199, 175, 0.12), 0 14px 36px rgba(2, 7, 5, 0.24);
  backdrop-filter: blur(14px);
}

.canvas-controls button {
  min-width: 34px;
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  color: #e6f0e8;
  background: rgba(216, 246, 231, 0.12);
  font-weight: 900;
}

.canvas-controls button:hover {
  color: #07100d;
  background: var(--accent-strong);
}

#recursiveCanvas,
#recursiveGraph {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  cursor: grab;
  touch-action: none;
}

#recursiveGraph {
  display: none;
}

#recursiveCanvas {
  position: absolute;
  inset: 0;
}

#recursiveGraph:active {
  cursor: grabbing;
}

#recursiveCanvas:active {
  cursor: grabbing;
}

.constellation-edge {
  filter: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  mix-blend-mode: normal;
  transition: none;
}

.constellation-edge.is-path {
  filter: none;
}

#recursiveGraph.is-panning .constellation-edge,
#recursiveGraph.is-panning .constellation-edge.is-path {
  filter: none;
  transition: none;
}

#recursiveGraph.is-panning .recursive-node,
#recursiveGraph.is-panning .recursive-dot,
#recursiveGraph.is-panning .constellation-edge {
  transition: none;
}

#recursiveGraph.is-panning .recursive-node,
#recursiveGraph.is-panning .recursive-node.depth-0,
#recursiveGraph.is-panning .recursive-node.on-path {
  box-shadow: none;
}

#recursiveGraph.is-panning .recursive-dot circle:first-child {
  animation: none;
  filter: none;
}

.constellation-edge.is-related {
  opacity: 0.92 !important;
  stroke-width: 3px;
}

.constellation-edge.is-dimmed {
  opacity: 0.035 !important;
}

.constellation-ring {
  stroke-dasharray: 4 12;
}

.recursive-node {
  display: grid;
  align-content: start;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(176, 211, 255, 0.26);
  border-radius: 16px;
  padding: 10px;
  color: #e8f2ff;
  background: linear-gradient(135deg, rgba(13, 28, 58, 0.9), rgba(5, 12, 26, 0.82));
  box-shadow: 0 0 22px rgba(157, 204, 255, 0.1), 0 18px 46px rgba(2, 7, 5, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}

.recursive-node.depth-0 {
  justify-content: center;
  padding: 18px;
  color: #fff;
  background: rgba(4, 10, 22, 0.94);
  border-color: rgba(232, 244, 255, 0.32);
  box-shadow: 0 0 46px rgba(220, 236, 255, 0.22), 0 28px 70px rgba(2, 7, 5, 0.42);
}

.recursive-node.selected {
  outline: 4px solid rgba(232, 244, 255, 0.11);
  border-color: rgba(240, 248, 255, 0.46);
}

.recursive-node.on-path {
  box-shadow: 0 0 32px rgba(212, 232, 255, 0.18), 0 18px 48px rgba(2, 7, 5, 0.3);
}

.recursive-node strong {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
}

.recursive-node.depth-0 strong {
  margin-bottom: 12px;
  font-size: 30px;
}

.recursive-node.depth-2 strong {
  font-size: 14px;
}

.recursive-node.depth-3 {
  padding: 12px;
  box-shadow: 0 0 18px rgba(212, 232, 255, 0.08), 0 10px 26px rgba(2, 7, 5, 0.24);
}

.recursive-node.depth-3 strong {
  margin-bottom: 6px;
  font-size: 15px;
}

.recursive-node.depth-3 p {
  font-size: 12px;
  line-height: 1.48;
}

.recursive-node.leaf p {
  display: block;
}

.recursive-dot {
  cursor: pointer;
  transition: none;
}

.recursive-dot circle:first-child {
  filter: none;
  animation: none;
  transform-box: fill-box;
  transform-origin: center;
}

.recursive-dot.is-related .star-core,
.recursive-dot.selected .star-core {
  opacity: 1;
  filter: none;
}

#recursiveGraph.is-hovering .recursive-dot.is-dimmed,
#recursiveGraph.is-hovering .recursive-node.is-dimmed {
  opacity: 0.18;
}

#recursiveGraph.is-hovering .recursive-node.is-related {
  filter: drop-shadow(0 0 16px rgba(225, 242, 255, 0.32));
}

.graph-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: min(300px, calc(100vw - 32px));
  border: 1px solid rgba(216, 246, 231, 0.2);
  border-radius: 18px;
  padding: 12px 13px;
  color: #eaf4ff;
  background: rgba(9, 16, 14, 0.9);
  box-shadow: 0 0 28px rgba(140, 199, 175, 0.1), 0 18px 44px rgba(2, 7, 5, 0.34);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(16px, 16px);
  transition: opacity 0.14s ease;
}

.graph-tooltip.is-detail {
  width: min(380px, calc(100vw - 32px));
  pointer-events: auto;
}

.graph-tooltip.visible {
  opacity: 1;
}

.graph-tooltip strong,
.graph-tooltip span {
  display: block;
}

.graph-tooltip strong {
  font-size: 15px;
}

.graph-tooltip span {
  margin-top: 4px;
  color: #9eb7d7;
  font-size: 12px;
  font-weight: 800;
}

.graph-tooltip p {
  margin: 8px 0 0;
  color: #c7d7ed;
  font-size: 12px;
  line-height: 1.6;
}

.graph-tooltip mark {
  border-radius: 5px;
  padding: 0 4px;
  color: var(--mark-text);
  background: var(--mark);
  font-weight: 850;
}

.tooltip-path,
.tooltip-children {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tooltip-path button,
.tooltip-children button {
  border: 1px solid rgba(190, 218, 255, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: #dce9ff;
  background: rgba(123, 181, 255, 0.1);
  font-size: 11px;
  font-weight: 850;
}

.tooltip-path i {
  color: #7890b2;
  font-style: normal;
}

.recursive-dot:hover circle:first-child,
.recursive-dot.selected circle:first-child {
  opacity: 1;
  stroke: #f7fbff;
  stroke-width: 2px;
}

#recursiveGraph.is-panning .recursive-label {
  display: none;
}

.recursive-label {
  fill: #dce9ff;
  paint-order: stroke;
  stroke: rgba(5, 11, 23, 0.86);
  stroke-width: 4px;
  font-size: 30px;
  font-weight: 750;
  pointer-events: none;
}

.recursive-label.depth-0 {
  fill: #fff;
  font-size: 44px;
  font-weight: 900;
}

.recursive-label.depth-2,
.recursive-label.depth-3 {
  fill: #b8cae4;
  font-size: 24px;
  font-weight: 680;
}

.graph-detail-panel {
  display: none;
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  width: min(390px, calc(100vw - 36px));
  border: 1px solid rgba(216, 246, 231, 0.18);
  border-radius: 22px;
  padding: 16px;
  color: #edf6ff;
  background: rgba(8, 15, 13, 0.82);
  box-shadow: 0 0 34px rgba(140, 199, 175, 0.1), 0 24px 70px rgba(2, 7, 5, 0.38);
  backdrop-filter: blur(16px);
}

.graph-detail-panel span {
  display: inline-block;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-strong);
  background: rgba(216, 246, 231, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.graph-detail-panel strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.graph-detail-panel p {
  margin: 10px 0 0;
  color: #c4d4eb;
  font-size: 14px;
  line-height: 1.75;
}

.graph-detail-panel mark {
  border-radius: 5px;
  padding: 1px 4px;
  color: #eef7ff;
  background: rgba(167, 204, 255, 0.18);
  font-weight: 850;
  cursor: pointer;
}

.graph-detail-panel mark.is-selected-term {
  color: #041020;
  background: #e8f4ff;
}

.detail-path,
.detail-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-path {
  align-items: center;
}

.detail-path i {
  color: #637894;
  font-style: normal;
}

.detail-path button,
.detail-children button {
  border: 1px solid rgba(174, 206, 255, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: #e2efe5;
  background: rgba(216, 246, 231, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.detail-path button:hover,
.detail-children button:hover {
  color: #061225;
  background: #b8d7ff;
}

@keyframes starPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.16);
  }
}

.recursive-node p {
  margin: 0;
  color: #bed0e8;
  font-size: 12px;
  line-height: 1.52;
}

.recursive-node.depth-0 p {
  color: #dce9fa;
  font-size: 14px;
  line-height: 1.68;
}

.recursive-node mark {
  border-radius: 5px;
  padding: 1px 4px;
  color: #eef7ff;
  background: rgba(167, 204, 255, 0.18);
  font-weight: 850;
  cursor: pointer;
}

.recursive-node mark.is-selected-term {
  color: #041020;
  background: #e8f4ff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 18px rgba(225, 242, 255, 0.36);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72)),
    linear-gradient(90deg, rgba(36, 89, 214, 0.08), transparent);
  box-shadow: var(--shadow);
}

.back-button {
  margin: 0;
  border: 0;
  padding: 10px 14px;
  color: #e9f3ff;
  background: rgba(12, 26, 56, 0.82);
}

.result-hero h2 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
}

.result-hero p {
  max-width: 850px;
  color: #465367;
  line-height: 1.8;
}

.summary-strip {
  justify-content: flex-end;
  gap: 10px;
}

.summary-strip div {
  min-width: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-strip strong {
  display: block;
  font-size: 28px;
}

.summary-strip span {
  color: var(--muted);
  font-size: 12px;
}

.result-nav {
  position: sticky;
  top: 79px;
  z-index: 8;
  gap: 8px;
  padding: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  overflow-x: auto;
}

.result-nav a {
  flex: 0 0 auto;
  color: #41506a;
  background: #f4f7fb;
}

.result-section {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
  scroll-margin-top: 142px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3 {
  font-size: clamp(26px, 3vw, 38px);
}

.brief-layout,
.graph-layout,
.path-layout,
.framework-layout {
  display: grid;
  gap: 18px;
}

.brief-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.framework-layout {
  grid-template-columns: 1fr;
}

.graph-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.path-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr) minmax(320px, 0.85fr);
}

.glass-panel,
.graph-panel {
  padding: 20px;
}

.glass-panel h4 {
  margin: 0 0 14px;
  font-size: 18px;
}

.focus-list,
.chain-map,
#graphNotes,
#learningPath,
.evidence-grid,
.framework-cards {
  display: grid;
  gap: 12px;
}

.framework-map {
  min-height: 720px;
}

.ring-map {
  position: relative;
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(36, 89, 214, 0.1), transparent 23%),
    repeating-linear-gradient(0deg, rgba(17, 24, 39, 0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.035) 0 1px, transparent 1px 34px),
    #fbfdff;
}

.ring-map::before,
.ring-map::after {
  position: absolute;
  inset: 64px 13%;
  border: 1px solid rgba(36, 89, 214, 0.16);
  border-radius: 50%;
  content: "";
}

.ring-map::after {
  inset: 148px 24%;
  border-color: rgba(11, 143, 134, 0.2);
}

.ring-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  background: #111827;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
  text-align: center;
}

.ring-core strong {
  max-width: 112px;
  margin-top: 24px;
  font-size: 21px;
  line-height: 1.25;
}

.ring-core span {
  margin-top: -22px;
  color: #c9d5e6;
  font-size: 12px;
  font-weight: 800;
}

.ring-layer {
  position: absolute;
  z-index: 3;
  width: min(420px, calc(100% - 30px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(31, 41, 55, 0.1);
}

.ring-1 {
  top: 58px;
  left: 8%;
}

.ring-2 {
  right: 7%;
  top: 245px;
}

.ring-3 {
  left: 10%;
  bottom: 58px;
}

.ring-layer div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ring-layer em {
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ring-layer strong {
  color: #1f2a3d;
  font-size: 16px;
}

.ring-layer p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.ring-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ring-tags span {
  border-radius: 999px;
  padding: 6px 8px;
  color: #33506b;
  background: #edf4fb;
  font-size: 12px;
  font-weight: 800;
}

.framework-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.framework-reading {
  padding: 18px;
}

.framework-reading .framework-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.framework-card > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  font-size: 12px;
  font-weight: 900;
}

.framework-card h4 {
  margin: 0 0 6px;
}

.framework-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.focus-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-item,
.chain-card,
.category-card,
.evidence-card,
.path-step,
.note-card,
.keyword-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.focus-item,
.keyword-row {
  width: 100%;
  color: inherit;
  text-align: left;
}

.focus-item:hover,
.keyword-row:hover,
.hot-list button:hover {
  border-color: rgba(36, 89, 214, 0.5);
  background: #f8fbff;
}

.focus-item strong,
.evidence-card strong {
  display: block;
  margin-bottom: 6px;
}

.focus-item span,
.keyword-desc,
.keyword-category,
.category-card p,
.evidence-card p,
.path-step p,
.note-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.tag-row,
.mini-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  color: #31506c;
  background: #e9f2fb;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.category-card {
  min-height: 148px;
}

.category-card .count {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #fff;
  font-weight: 850;
}

.keyword-table {
  display: grid;
  gap: 8px;
}

.keyword-row {
  display: grid;
  grid-template-columns: 52px 140px 150px minmax(240px, 1fr) 64px 82px;
  gap: 12px;
  align-items: center;
}

button.keyword-row {
  appearance: none;
}

.keyword-row.header {
  position: sticky;
  top: 135px;
  z-index: 4;
  color: var(--muted);
  background: #eef3f9;
  font-size: 13px;
  font-weight: 850;
}

.keyword-row.selected {
  border-color: rgba(36, 89, 214, 0.62);
  box-shadow: 0 0 0 3px rgba(36, 89, 214, 0.1);
}

.keyword-name {
  font-weight: 850;
}

.mini-relations span,
.confidence {
  color: #4f5e72;
  background: #eef2f7;
}

.confidence {
  display: inline-flex;
  justify-content: center;
}

.confidence.medium {
  color: #0d5f58;
  background: #dff5f1;
}

.importance {
  height: 8px;
  border-radius: 999px;
  background: #e8edf4;
}

.importance span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.graph-panel svg {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(17, 24, 39, 0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(17, 24, 39, 0.035) 0 1px, transparent 1px 34px),
    #fbfdff;
}

.graph-node {
  cursor: pointer;
}

.graph-node.selected circle:nth-of-type(2) {
  stroke-width: 5;
}

.graph-node:hover circle:nth-of-type(2) {
  filter: drop-shadow(0 10px 16px rgba(36, 89, 214, 0.18));
}

.node-label {
  font-size: 13px;
  font-weight: 850;
  fill: #18212f;
}

.node-label.root {
  fill: #fff;
  font-size: 19px;
}

.node-sub {
  font-size: 11px;
  fill: #667085;
}

.node-sub.root {
  fill: #c9d5e6;
  font-size: 13px;
}

.ring-label,
.edge-label {
  fill: #6a7890;
  font-size: 11px;
  font-weight: 850;
}

.edge-label {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.relation-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.relation-title span {
  flex: 0 0 auto;
  color: #fff;
}

.sub-panel-title {
  margin-top: 22px !important;
}

.concept-card,
.market-card,
.citation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.concept-category,
.market-card span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.concept-card h4,
.market-card h4 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.concept-card p,
.market-card p,
.citation-card p {
  color: var(--muted);
  line-height: 1.72;
}

.recursive-terms {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f8fc;
}

.recursive-terms strong {
  display: block;
  margin-bottom: 9px;
  color: #344158;
  font-size: 13px;
}

.keyword-chip {
  border: 0;
}

.concept-card dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.concept-card dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.concept-card dt {
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.concept-card dd {
  margin: 0;
  color: #344158;
  font-size: 13px;
  line-height: 1.55;
}

.market-card span {
  color: var(--blue);
  background: #e8f0ff;
}

.citation-card {
  display: grid;
  gap: 10px;
}

.citation-card div {
  display: grid;
  gap: 4px;
}

.citation-card strong {
  color: #18212f;
}

.citation-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.citation-card blockquote {
  margin: 0;
  border-left: 3px solid rgba(36, 89, 214, 0.32);
  padding-left: 12px;
  color: #344158;
  font-size: 13px;
  line-height: 1.68;
}

.citation-card a {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.citation-card a.disabled {
  color: #657084;
  background: #eef2f7;
  pointer-events: none;
}

.question-panel ul,
#expertQuestions {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #3b4656;
  line-height: 1.65;
}

.evidence-card span,
#generatedAt {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.evidence-card em {
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
}

.evidence-card a {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--blue);
  background: #e8f0ff;
  font-size: 12px;
  font-weight: 850;
}

.export-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.export-actions button {
  padding: 11px 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 220% 0, 0 0;
  }

  100% {
    background-position: -120% 0, 0 0;
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: card-rise 0.8s var(--ease) both;
  }

  .method-grid article {
    animation: card-rise 0.8s var(--ease) both;
  }

  .method-grid article:nth-child(2) {
    animation-delay: 0.08s;
  }

  .method-grid article:nth-child(3) {
    animation-delay: 0.16s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1120px) {
  .hero,
  .result-hero,
  .brief-layout,
  .framework-layout,
  .graph-layout,
  .path-layout {
    grid-template-columns: 1fr;
  }

  .method-grid,
  .category-grid,
  .framework-reading .framework-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid article:nth-child(2),
  .method-grid article:nth-child(3) {
    margin-top: 0;
  }

  .summary-strip {
    justify-content: flex-start;
  }

  .map-topbar {
    max-width: calc(100vw - 228px);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    top: 10px;
    width: min(100% - 20px, 1180px);
    border-radius: 24px;
  }

  .header-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .method-visual {
    min-height: 450px;
    border-radius: 24px;
  }

  .visual-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .method-grid,
  .category-grid,
  .focus-list,
  .framework-reading .framework-cards {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .progress-steps {
    grid-template-columns: 1fr;
  }

  .result-stage {
    padding-inline: 0;
  }

  .recursive-map-page {
    height: calc(100dvh - 126px);
    min-height: 640px;
  }

  .map-topbar {
    top: 12px;
    left: 12px;
    max-width: calc(100vw - 24px);
  }

  .canvas-controls {
    top: auto;
    right: 12px;
    bottom: 12px;
  }

  .map-stats {
    display: none;
  }

  .summary-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .summary-strip div {
    min-width: 0;
    padding: 12px;
  }

  .section-heading.split {
    align-items: stretch;
    flex-direction: column;
  }

  .keyword-row,
  .keyword-row.header {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .keyword-row > :nth-child(3),
  .keyword-row > :nth-child(4),
  .keyword-row > :nth-child(5),
  .keyword-row > :nth-child(6),
  .keyword-row.header > :nth-child(3),
  .keyword-row.header > :nth-child(4),
  .keyword-row.header > :nth-child(5),
  .keyword-row.header > :nth-child(6) {
    grid-column: 2;
  }

  .framework-map,
  .ring-map {
    min-height: 0;
  }

  .ring-map {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .ring-map::before,
  .ring-map::after {
    display: none;
  }

  .ring-core,
  .ring-layer {
    position: static;
    width: 100%;
    transform: none;
  }

  .ring-core {
    height: auto;
    min-height: 104px;
    border-radius: 8px;
  }

  .ring-core strong,
  .ring-core span {
    margin: 0;
  }
}
