/* thequant.space customizations on top of PaperMod */

/* Newsletter box */
.newsletter-box {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--entry);
}
.newsletter-box h3 { margin: 0 0 .5rem; }
.newsletter-box p { margin: 0 0 1rem; color: var(--secondary); font-size: .95rem; }
.newsletter-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--theme);
  color: var(--primary);
  font-size: 1rem;
}
.newsletter-form button {
  padding: .6rem 1.4rem;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.newsletter-form button:hover { background: #2563eb; }
.newsletter-form button:disabled { opacity: .6; cursor: wait; }
.nl-hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.newsletter-status { min-height: 1.2em; margin-top: .5rem; }

/* Score badges on flowchart pages */
.post-content blockquote {
  border-inline-start: 3px solid #3b82f6;
}

/* Mermaid diagrams: center and give breathing room */
pre.mermaid {
  display: flex;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
}

/* Topic hub pages */
.score-badge {
  display: inline-block;
  padding: .1rem .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
  color: var(--secondary);
}
.score-quadrant { color: #3b82f6; border-color: #3b82f6; }
.topic-list-heading { margin-bottom: .2rem; }
.topic-list-note { color: var(--secondary); font-size: .9rem; margin-top: 0; }
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.topic-card {
  display: block;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--entry);
  color: var(--primary);
}
.topic-card:hover { border-color: #3b82f6; }
.topic-card h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.topic-card p { margin: 0 0 .6rem; color: var(--secondary); font-size: .9rem; }
.topic-count { color: #3b82f6; font-size: .85rem; font-weight: 600; }
.topic-others { margin-top: 2rem; }
.topic-links {
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--entry);
  font-size: .95rem;
}
.topic-links span { color: var(--secondary); margin-right: .5rem; }
.topic-links a {
  display: inline-block;
  margin: .2rem .6rem .2rem 0;
  color: #3b82f6;
}

/* Related papers module */
.related-papers {
  margin: 2rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--entry);
}
.related-papers h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.related-papers ul { margin: 0; padding-left: 1.2rem; }
.related-papers li { margin-bottom: .45rem; font-size: .95rem; }
