/* Page styles for the post "Efficient Multi-Word Compare-and-Swap".
 *
 * These lived in a <style> block in the standalone page's <head>. The
 * migration kept each post's <body> markup but not its head, so the
 * markup still carried classes like .mcas-section-kicker while nothing
 * defined them -- the blue Google Sans kicker above each section
 * rendered as plain black text, and the callouts, figures, captions and
 * code blocks lost their styling too.
 *
 * Copied verbatim from the original; loaded via `extra_css` in the
 * post's front matter so it applies only to this post.
 */

html {
  scroll-behavior: smooth;
}

.mcas-hero-note {
  max-width: 820px;
  margin: 1.25rem auto 0;
  color: #4a4a4a;
  line-height: 1.65;
}

.mcas-section-kicker {
  color: #3273dc;
  font-family: "Google Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

.mcas-callout {
  border-left: 5px solid #3273dc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.05);
}

.mcas-warm-callout {
  border-left: 5px solid #ffb020;
  background: #fffaf0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}

.mcas-good-callout {
  border-left: 5px solid #23d160;
  background: #f3fff7;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}

.mcas-danger-callout {
  border-left: 5px solid #ff3860;
  background: #fff5f7;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}

.mcas-purple-callout {
  border-left: 5px solid #7957d5;
  background: #faf7ff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}

.mcas-figure {
  margin: 1.75rem 0;
}

.mcas-figure img,
.mcas-carousel-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(10, 10, 10, 0.10);
  background: white;
}

.mcas-caption {
  color: #666;
  font-size: 0.95rem;
  margin-top: 0.75rem;
  text-align: center;
}

.mcas-code {
  background: #111827;
  color: #f5f7fa;
  border-radius: 10px;
  padding: 1.15rem;
  overflow-x: auto;
  box-shadow: 0 8px 26px rgba(10, 10, 10, 0.12);
  margin: 1.25rem 0;
  border: 1px solid #2d3748;
}

.mcas-code code {
  color: #f5f7fa;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre;
}

.metric-card {
  height: 100%;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.04);
}

.metric-card .heading {
  letter-spacing: 0;
  color: #666;
}

.mini-label {
  display: inline-block;
  font-family: "Google Sans", sans-serif;
  font-weight: 700;
  color: #363636;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  margin-right: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.mcas-carousel-card {
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 10px;
  min-height: 100%;
}

.mcas-carousel-card p {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.75rem;
  line-height: 1.45;
}

.story-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(50, 115, 220, 0), rgba(50, 115, 220, 0.35), rgba(50, 115, 220, 0));
  margin: 2.25rem 0;
}

.toc-card {
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(50, 115, 220, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.toc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.09);
}

.toc-card a {
  color: inherit;
  display: block;
}

.snippet-frame {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #0d1117;
  box-shadow: 0 8px 26px rgba(10, 10, 10, 0.14);
  margin: 1.25rem 0 0.5rem;
}

.snippet-frame.short {
  height: 430px;
}

.snippet-frame.medium {
  height: 560px;
}

.snippet-frame.tall {
  height: 720px;
}

.walkthrough-panel {
  background: linear-gradient(135deg, #f7fbff, #f9fff7);
  border: 1px solid rgba(50, 115, 220, 0.13);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 6px 22px rgba(10, 10, 10, 0.06);
}

.gif-card img {
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(10, 10, 10, 0.12);
}

details.mcas-details {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  background: #ffffff;
  margin: 0.8rem 0;
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.035);
}

details.mcas-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #363636;
}

.compact-table td,
.compact-table th {
  vertical-align: middle;
}

/* Interactive Card Styles from Complexity Blog */
.problem-card {
  border-bottom: 1px solid #eee;
  padding: 1em 0;
  transition: all 0.2s ease;
}

.problem-card:hover {
  background-color: #fafafa;
}

.problem-card .details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.problem-card .details.expanded {
  max-height: 800px !important;
}

.interactive-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.interactive-item:hover {
  background-color: #f5f5f5;
}

.tooltip {
  display: none;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
}
