:root {
  color-scheme: light dark;
  --fg: #171a17;
  --bg: #ffffff;
  --bg-raised: #f4f2ea;
  --muted: #6c7268;
  --accent: #0e9c47;
  --accent-dim: #1d5c33;
  --border: #ddd9cc;
  --font-display: "Space Grotesk Variable", "Space Grotesk", sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e8e6e0;
    --bg: #0b0d0b;
    --bg-raised: #1a1e1a;
    --muted: #9aa29a;
    --accent: #33e667;
    --accent-dim: #9fdcb6;
    --border: #262b26;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-display), -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* Scroll-reveal — elements fade/slide in as they enter view (see interactions.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Hero — asymmetric two-column on wide screens, not a boxed/centered block */
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: end;
  padding: 1rem 0 0.5rem;
  isolation: isolate;
}
/* Hero decorative layer — floating blobs, orbit rings, dot-grid */
.hero-decor {
  position: absolute;
  top: -3rem;
  right: calc(-2rem - max(0px, (100vw - 1100px) / 2));
  bottom: auto;
  left: auto;
  width: 42rem;
  height: 34rem;
  max-width: 90vw;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.55;
}
.hero-blob-a {
  top: -2rem; right: -4rem;
  width: 24rem; height: 24rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 70%);
  animation: driftA 16s ease-in-out infinite;
}
.hero-blob-b {
  top: 8rem; right: 10rem;
  width: 14rem; height: 14rem;
  background: radial-gradient(circle, color-mix(in srgb, #3b82f6 20%, transparent) 0%, transparent 70%);
  animation: driftB 12s ease-in-out infinite;
}
.hero-blob-c {
  top: 1rem; right: 1rem;
  width: 10rem; height: 10rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-dim) 24%, transparent) 0%, transparent 70%);
  animation: driftC 20s ease-in-out infinite;
}
@keyframes driftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-1.8rem, 1.6rem) scale(1.1); }
}
@keyframes driftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(1.4rem, -1.2rem) scale(0.92); }
}
@keyframes driftC {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-1rem, -1.4rem) rotate(8deg); }
}

.hero-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  opacity: 0.5;
}
.hero-orbit-a { top: 2rem; right: 6rem; width: 0.6rem; height: 0.6rem; background: var(--accent); border: none; animation: orbitA 9s linear infinite; }
.hero-orbit-b { top: 9rem; right: 2rem; width: 5rem; height: 5rem; animation: spin 22s linear infinite; }
.hero-orbit-c { top: 5rem; right: 15rem; width: 0.4rem; height: 0.4rem; background: color-mix(in srgb, var(--accent) 70%, transparent); border: none; animation: orbitC 13s ease-in-out infinite; }
@keyframes orbitA {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1.2rem, 0.6rem); }
  50% { transform: translate(0.4rem, 1.6rem); }
  75% { transform: translate(-0.8rem, 0.5rem); }
  100% { transform: translate(0, 0); }
}
@keyframes orbitC {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(-1.5rem, 1rem); opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, black 0%, transparent 75%);
  animation: patternDrift 30s linear infinite;
}
@keyframes patternDrift {
  from { background-position: 0 0; }
  to { background-position: 44px 22px; }
}

@media (max-width: 899px) {
  .hero-decor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-orbit, .hero-grid-pattern { animation: none; }
}

/* Hero load-in — staggered entrance, separate from scroll-reveal since it's above the fold */
.hero-enter-item {
  opacity: 0;
  transform: translateY(14px);
  animation: heroEnter 0.7s ease forwards;
  animation-delay: calc(var(--d, 0) * 90ms + 60ms);
}
@keyframes heroEnter {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-enter-item { opacity: 1; transform: none; animation: none; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.3fr 0.7fr; padding: 2.5rem 0 1rem; }
}
.hero-figure { display: none; }
@media (min-width: 900px) {
  .hero-figure {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
  }
  .hero-figure .big-num {
    font-family: var(--mono);
    font-weight: 700;
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    line-height: 0.9;
    color: var(--accent);
    letter-spacing: -0.03em;
  }
  .hero-figure .big-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

.hero { padding: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.75rem;
}
.eyebrow .dot { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.05;
  max-width: 18ch;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.5rem;
}
.cta-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
}
.cta-secondary {
  border: 1px solid var(--border);
  color: var(--fg);
  font-weight: 600;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
}
@media (prefers-color-scheme: dark) {
  .cta-primary { color: #06170b; }
}

/* Real marquee — an actually-moving strip, not a static row pretending to be a ticker */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding: 0.85rem 0;
  animation: marquee-scroll 32s linear infinite;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track strong { color: var(--fg); font-weight: 700; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Horizontal drag-scroll row — an actual carousel, used instead of static wrapping grids */
.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0 -0.25rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.scroll-row > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(240px, 78vw);
}

.category-grid {
  list-style: none;
  padding: 0;
}

.tilt-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tilt-card:hover {
  transform: translateY(-3px) rotate(-0.3deg);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.band-raised {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2rem 0;
}

/* Benefit / how-it-works grid */
.benefit-grid, .steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2rem;
}
.benefit-grid h3, .steps-grid h3 { font-size: 1rem; margin: 0 0 0.35rem; }
.benefit-grid p, .steps-grid p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
@media (prefers-color-scheme: dark) {
  .step-index { color: #06170b; }
}

a { color: inherit; }
main a:not(.ranked-main):not(.pill):not(.cta-primary):not(.cta-secondary):not(.visit-link) { color: var(--accent); }

h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 0.4rem 0 0.5rem; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 0.75rem; }

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.stats strong { color: var(--fg); font-size: 1.1rem; display: block; font-family: -apple-system, sans-serif; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.brand-mark { width: 1.6rem; height: 1.6rem; flex-shrink: 0; }

.site-header ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-header a { text-decoration: none; color: var(--fg); opacity: 0.75; transition: opacity 0.15s ease, color 0.15s ease; }
.site-header a:hover { opacity: 1; color: var(--accent); }

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--fg);
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.nav-dropdown[open] summary::after { transform: rotate(225deg) translateY(2px); }
.nav-dropdown:hover summary, .nav-dropdown[open] summary { opacity: 1; color: var(--accent); }
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.25);
  width: max-content;
  min-width: 12rem;
  z-index: 20;
  text-align: left;
}
.nav-dropdown-panel li { width: 100%; text-align: left; }
.nav-dropdown-panel a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--fg);
  opacity: 0.85;
  white-space: nowrap;
}
.nav-dropdown-panel a::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  flex-shrink: 0;
}
.nav-dropdown-panel a:hover { opacity: 1; background: var(--bg-raised); }
@media (max-width: 640px) {
  .nav-dropdown-panel { left: 0; transform: none; }
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
.site-footer p { display: flex; align-items: center; gap: 0.5rem; }

/* Directory intro — centered hero block (search + filters), results list below stays left-aligned */
.directory-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.directory-hero .eyebrow { align-self: center; }
.directory-hero .search-input { max-width: 480px; }
.directory-hero .filter-bar,
.directory-hero .filter-dropdowns { justify-content: center; }
.directory-hero .result-count { align-self: center; }

/* Mind map intro — centered hero above the full-bleed graph */
.graph-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin: 0.25rem auto 0;
}
.graph-hero .eyebrow { align-self: center; }
.graph-howto {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.graph-howto li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
}
.graph-howto-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.graph-legend {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
}
.graph-legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.graph-legend-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Category pill filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.filter-pill {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--muted);
  cursor: pointer;
}
.filter-pill:hover { color: var(--fg); }
.filter-pill[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.filter-dropdowns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.filter-select {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
}

.search-input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
  margin-bottom: 1rem;
}
.search-input::placeholder { color: var(--muted); }

.graph-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 1rem;
}
.graph-controls .search-input {
  flex: 1 1 240px;
  width: auto;
  margin-bottom: 0;
}
.country-filter {
  flex: 0 1 200px;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
}

.result-count {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* Ranked list */
.ranked-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.ranked-item {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--border);
}

.ranked-index {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.avatar-wrap {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: inline-flex;
}

.avatar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(var(--hue) 70% 25%);
  background: hsl(var(--hue) 70% 88%);
  flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
  .avatar { color: hsl(var(--hue) 70% 88%); background: hsl(var(--hue) 40% 20%); }
}

.ranked-main {
  text-decoration: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.ranked-name { font-weight: 600; color: var(--fg); }
.ranked-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-tags {
  display: none;
}
@media (min-width: 700px) {
  .ranked-tags { display: flex; gap: 0.35rem; }
}

.ranked-rating {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.ranked-rating-count { color: var(--muted); }

.deal-item {
  grid-template-columns: 2rem 1fr auto auto 1.25rem;
}
.deal-item .deal-main { padding: 0.1rem 0; text-decoration: none; }
.deal-date, .deal-price { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.deal-price { font-weight: 600; color: var(--fg); min-width: 5rem; text-align: right; }
.deal-source { color: var(--muted); text-decoration: none; text-align: center; }
.deal-source:hover { color: var(--accent); }
@media (max-width: 560px) {
  .deal-item { grid-template-columns: 1.5rem 1fr auto 1.25rem; }
  .deal-date { display: none; }
}

.deal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
}
.deal-facts > div { display: flex; flex-direction: column; gap: 0.15rem; }
.deal-facts dt { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.deal-facts dd { margin: 0; font-weight: 600; }

/* Category pills (also used inline in tags) */
.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-blue { background: #dbe8ff; color: #0d3e9e; }
.pill-purple { background: #ece3ff; color: #5b2bb8; }
.pill-green { background: #dcf5e2; color: #16713a; }
.pill-orange { background: #ffe8cf; color: #96470a; }
.pill-pink { background: #ffe0ec; color: #a1215f; }
.pill-gray { background: #eaeaec; color: #46484d; }

@media (prefers-color-scheme: dark) {
  .pill-blue { background: #122a5c; color: #a9c6ff; }
  .pill-purple { background: #2c1a55; color: #d6c4ff; }
  .pill-green { background: #0f3d21; color: #a6ecbb; }
  .pill-orange { background: #4a2a05; color: #ffcb96; }
  .pill-pink { background: #4a132e; color: #ffb3d3; }
  .pill-gray { background: #2a2a2d; color: #c7c8cc; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.heading-underline {
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.45rem;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: left center;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-3px) rotate(-0.3deg);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}
.card h3 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.card h3 a { text-decoration: none; color: var(--fg); }
.card p { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* Category badges block on listing detail page */
.badge-row { display: flex; gap: 0.4rem; margin: 0.5rem 0 1rem; flex-wrap: wrap; }

/* Mind map — Obsidian-style force-directed graph, rendered on canvas */
/* Full-bleed — breaks out of the 1100px content column so the graph feels like
   part of the page, not a boxed widget dropped into it. */
.mindmap-root {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin: 1.5rem 0 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg);
  overflow: hidden;
}
.mindmap-canvas { width: 100%; height: min(88vh, 880px); display: block; cursor: grab; touch-action: none; }
.mindmap-canvas.mm-dragging { cursor: grabbing; }
.mindmap-reset {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.mindmap-reset:hover { border-color: var(--accent); color: var(--accent); }
.mindmap-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  max-width: min(46%, 320px);
  font-size: 0.72rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  pointer-events: none;
  text-align: right;
}

.mindmap-search-results {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 6;
  width: min(320px, calc(100% - 1.5rem));
  max-height: min(60vh, 420px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised, var(--bg));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.mindmap-search-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.7rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.mindmap-search-results button:last-child { border-bottom: none; }
.mindmap-search-results button:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mindmap-search-results .mm-sr-label { font-weight: 600; font-size: 0.85rem; display: block; }
.mindmap-search-results .mm-sr-meta { color: var(--muted); font-size: 0.72rem; }

.mindmap-progress {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem 0.4rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fg);
  transition: transform 0.25s ease;
}
.mindmap-progress.mm-bump { transform: scale(1.08); }
.mindmap-progress-track {
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.mindmap-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.mindmap-toast {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  z-index: 6;
  transform: translate(-50%, -12px);
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.mindmap-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .mindmap-progress { top: auto; bottom: 0.75rem; left: 50%; transform: translateX(-50%); }
  .mindmap-progress.mm-bump { transform: translateX(-50%) scale(1.08); }
  /* The howto pills above the canvas already explain this — drop it rather
     than risk it overlapping the now-centered progress pill at the bottom. */
  .mindmap-hint { display: none; }
}

.mindmap-panel {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  width: min(320px, calc(100% - 1.5rem));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  overflow-y: auto;
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.3);
}
.mindmap-panel h2 { margin: 0 0.5rem 0.2rem 0; font-size: 1.05rem; }
.mindmap-panel-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.mindmap-panel-close:hover { color: var(--fg); }
.mindmap-panel-count { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.8rem; }
.mindmap-panel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mindmap-panel-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid transparent;
}
.mindmap-panel-list a:hover { background: var(--bg-raised); border-color: var(--border); }
.mm-panel-target { font-weight: 600; font-size: 0.85rem; }
.mm-panel-meta { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
@media (max-width: 640px) {
  .mindmap-panel { position: static; width: auto; margin-top: 0.75rem; border-radius: 0; border-width: 1px 0 0; max-height: 320px; }
}

/* Academics — research papers & case studies */
.research-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}
.research-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.research-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}
.research-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.research-year { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.research-title { margin: 0 0 0.3rem; font-size: 1.05rem; line-height: 1.35; }
.research-meta { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.82rem; }
.research-brief { margin: 0 0 0.9rem; font-size: 0.9rem; line-height: 1.5; color: var(--fg); opacity: 0.9; flex: 1; }
.research-card .visit-link { margin-top: auto; align-self: flex-start; }

/* Detail page */
.subtitle { color: var(--muted); font-size: 1.1rem; margin-top: -0.25rem; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1.5rem;
}
.feature-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--fg);
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 560px) {
  .pros-cons { grid-template-columns: 1fr; }
}
.pros-cons h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.pros-list, .cons-list { list-style: none; padding: 0; margin: 0; }
.pros-list li, .cons-list li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.4rem;
  color: var(--muted);
}
.pros-list li::before { content: "+"; position: absolute; left: 0; color: #16713a; font-weight: 700; }
.cons-list li::before { content: "–"; position: absolute; left: 0; color: #96470a; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .pros-list li::before { color: #a6ecbb; }
  .cons-list li::before { color: #ffcb96; }
}

.reviews-list { list-style: none; padding: 0; margin: 0; }
.reviews-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.reviews-list p { margin: 0.35rem 0 0; color: var(--muted); }

.review-form {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}
.review-form h3 { margin: 0; font-size: 1rem; }
.review-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.review-form input[type="text"],
.review-form select,
.review-form textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
}
.review-form button {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font: inherit;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}
.faq-item p { margin: 0.5rem 0 0; color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crumb { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.visit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.visit-link:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.visit-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
  .visit-link { color: #06170b; }
  .visit-link:hover { box-shadow: 0 4px 14px rgba(51, 230, 103, 0.25); }
}

@media (max-width: 500px) {
  .ranked-item { grid-template-columns: 2.25rem 1fr auto; }
  .ranked-rating { display: none; }
}

.section-cta { margin: 0.5rem 0 2rem; }

.history-band {
  margin: 2.5rem 0;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--bg-raised);
}
.history-band .hero-figure { background: transparent; }

.acquirer-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
}
.acquirer-pills .pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; }
.acquirer-pills .pill span {
  font-family: var(--mono);
  opacity: 0.7;
  font-size: 0.7rem;
}

/* Sponsor page slot grid */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  margin: 1.25rem 0 2rem;
}
.slot-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-raised);
}
.slot-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.slot-status {
  color: var(--accent);
  font-size: 1rem;
}
.slot-card .cta-secondary {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}
